aboutsummaryrefslogtreecommitdiff
path: root/lua.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-12-10 20:09:51 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-12-10 20:09:51 -0200
commit9cd36059ad6f3f6750b8cff54c305ae347c6caca (patch)
tree6b71bb5dab3c7f1e8fec12bc03830b58cdc59fc0 /lua.c
parent592a309177edc52847b1196969ad6d49ba21f4fb (diff)
downloadlua-9cd36059ad6f3f6750b8cff54c305ae347c6caca.tar.gz
lua-9cd36059ad6f3f6750b8cff54c305ae347c6caca.tar.bz2
lua-9cd36059ad6f3f6750b8cff54c305ae347c6caca.zip
new API functions lua_getstr/lua_setstr
Diffstat (limited to 'lua.c')
-rw-r--r--lua.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lua.c b/lua.c
index 933fb8ca..0453cf74 100644
--- a/lua.c
+++ b/lua.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.c,v 1.72 2001/11/27 20:56:47 roberto Exp $ 2** $Id: lua.c,v 1.1 2001/11/29 22:14:34 rieru Exp rieru $
3** Lua stand-alone interpreter 3** Lua stand-alone interpreter
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -133,9 +133,8 @@ static void getargs (char *argv[]) {
133 lua_settable(L, -3); 133 lua_settable(L, -3);
134 } 134 }
135 /* arg.n = maximum index in table `arg' */ 135 /* arg.n = maximum index in table `arg' */
136 lua_pushliteral(L, "n");
137 lua_pushnumber(L, i-1); 136 lua_pushnumber(L, i-1);
138 lua_settable(L, -3); 137 lua_setstr(L, -2, "n");
139} 138}
140 139
141 140