From 9cd36059ad6f3f6750b8cff54c305ae347c6caca Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 10 Dec 2001 20:09:51 -0200 Subject: new API functions lua_getstr/lua_setstr --- lua.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lua.c') diff --git a/lua.c b/lua.c index 933fb8ca..0453cf74 100644 --- a/lua.c +++ b/lua.c @@ -1,5 +1,5 @@ /* -** $Id: lua.c,v 1.72 2001/11/27 20:56:47 roberto Exp $ +** $Id: lua.c,v 1.1 2001/11/29 22:14:34 rieru Exp rieru $ ** Lua stand-alone interpreter ** See Copyright Notice in lua.h */ @@ -133,9 +133,8 @@ static void getargs (char *argv[]) { lua_settable(L, -3); } /* arg.n = maximum index in table `arg' */ - lua_pushliteral(L, "n"); lua_pushnumber(L, i-1); - lua_settable(L, -3); + lua_setstr(L, -2, "n"); } -- cgit v1.2.3-55-g6feb