summaryrefslogtreecommitdiff
path: root/lua.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-08-26 11:19:55 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-08-26 11:19:55 -0300
commit5dcd908add10cdeb74400fb2e67ba58079c69ae7 (patch)
tree19505a5c2b49021a2afeee2cf9834cde299c0632 /lua.c
parent32d4f304db365599a54b3eb30377ac6e20846749 (diff)
downloadlua-5dcd908add10cdeb74400fb2e67ba58079c69ae7.tar.gz
lua-5dcd908add10cdeb74400fb2e67ba58079c69ae7.tar.bz2
lua-5dcd908add10cdeb74400fb2e67ba58079c69ae7.zip
detail
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 7cc48582..a8c289e5 100644
--- a/lua.c
+++ b/lua.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.c,v 1.129 2004/07/01 14:26:28 roberto Exp roberto $ 2** $Id: lua.c,v 1.130 2004/07/13 19:56:44 roberto Exp roberto $
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*/
@@ -107,9 +107,8 @@ static int getargs (lua_State *L, char *argv[], int n) {
107 narg = i-(n+1); /* number of arguments to the script (not to `lua.c') */ 107 narg = i-(n+1); /* number of arguments to the script (not to `lua.c') */
108 lua_newtable(L); 108 lua_newtable(L);
109 for (i=0; argv[i]; i++) { 109 for (i=0; argv[i]; i++) {
110 lua_pushnumber(L, i - n);
111 lua_pushstring(L, argv[i]); 110 lua_pushstring(L, argv[i]);
112 lua_rawset(L, -3); 111 lua_rawseti(L, -2, i - n);
113 } 112 }
114 return narg; 113 return narg;
115} 114}