From bfdcbbcd76c7187022fe2d35675de0b1c92eeadf Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 29 Dec 2005 14:23:32 -0200 Subject: small optimizations (lua_newtable -> lua_createtable) --- lua.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lua.c') diff --git a/lua.c b/lua.c index 1977a793..964ecdb0 100644 --- a/lua.c +++ b/lua.c @@ -1,5 +1,5 @@ /* -** $Id: lua.c,v 1.155 2005/11/28 14:44:48 roberto Exp roberto $ +** $Id: lua.c,v 1.156 2005/12/29 12:30:16 roberto Exp roberto $ ** Lua stand-alone interpreter ** See Copyright Notice in lua.h */ @@ -120,7 +120,7 @@ static int getargs (lua_State *L, char **argv, int n) { luaL_checkstack(L, narg + 3, "too many arguments to script"); for (i=n+1; i < argc; i++) lua_pushstring(L, argv[i]); - lua_newtable(L); + lua_createtable(L, narg, n + 1); for (i=0; i < argc; i++) { lua_pushstring(L, argv[i]); lua_rawseti(L, -2, i - n); -- cgit v1.2.3-55-g6feb