summaryrefslogtreecommitdiff
path: root/lua.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-12-29 14:23:32 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-12-29 14:23:32 -0200
commitbfdcbbcd76c7187022fe2d35675de0b1c92eeadf (patch)
treee312b2b1d54e4854693c2e410fb6f0f9bd37c84d /lua.c
parent30eebb2d1cc2cdd14426b9e80a9e1c576b955f6b (diff)
downloadlua-bfdcbbcd76c7187022fe2d35675de0b1c92eeadf.tar.gz
lua-bfdcbbcd76c7187022fe2d35675de0b1c92eeadf.tar.bz2
lua-bfdcbbcd76c7187022fe2d35675de0b1c92eeadf.zip
small optimizations (lua_newtable -> lua_createtable)
Diffstat (limited to 'lua.c')
-rw-r--r--lua.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lua.c b/lua.c
index 1977a793..964ecdb0 100644
--- a/lua.c
+++ b/lua.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.c,v 1.155 2005/11/28 14:44:48 roberto Exp roberto $ 2** $Id: lua.c,v 1.156 2005/12/29 12:30:16 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*/
@@ -120,7 +120,7 @@ static int getargs (lua_State *L, char **argv, int n) {
120 luaL_checkstack(L, narg + 3, "too many arguments to script"); 120 luaL_checkstack(L, narg + 3, "too many arguments to script");
121 for (i=n+1; i < argc; i++) 121 for (i=n+1; i < argc; i++)
122 lua_pushstring(L, argv[i]); 122 lua_pushstring(L, argv[i]);
123 lua_newtable(L); 123 lua_createtable(L, narg, n + 1);
124 for (i=0; i < argc; i++) { 124 for (i=0; i < argc; i++) {
125 lua_pushstring(L, argv[i]); 125 lua_pushstring(L, argv[i]);
126 lua_rawseti(L, -2, i - n); 126 lua_rawseti(L, -2, i - n);