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) --- lbaselib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lbaselib.c') diff --git a/lbaselib.c b/lbaselib.c index 6f495d55..8529414d 100644 --- a/lbaselib.c +++ b/lbaselib.c @@ -1,5 +1,5 @@ /* -** $Id: lbaselib.c,v 1.186 2005/10/21 13:47:42 roberto Exp roberto $ +** $Id: lbaselib.c,v 1.187 2005/12/27 17:10:11 roberto Exp roberto $ ** Basic library ** See Copyright Notice in lua.h */ @@ -625,7 +625,7 @@ static void base_open (lua_State *L) { auxopen(L, "ipairs", luaB_ipairs, ipairsaux); auxopen(L, "pairs", luaB_pairs, luaB_next); /* `newproxy' needs a weaktable as upvalue */ - lua_newtable(L); /* new table `w' */ + lua_createtable(L, 0, 1); /* new table `w' */ lua_pushvalue(L, -1); /* `w' will be its own metatable */ lua_setmetatable(L, -2); lua_pushliteral(L, "kv"); -- cgit v1.2.3-55-g6feb