diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-12-10 20:09:51 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-12-10 20:09:51 -0200 |
commit | 9cd36059ad6f3f6750b8cff54c305ae347c6caca (patch) | |
tree | 6b71bb5dab3c7f1e8fec12bc03830b58cdc59fc0 /lua.c | |
parent | 592a309177edc52847b1196969ad6d49ba21f4fb (diff) | |
download | lua-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.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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 | ||