diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-12-29 14:23:32 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-12-29 14:23:32 -0200 |
commit | bfdcbbcd76c7187022fe2d35675de0b1c92eeadf (patch) | |
tree | e312b2b1d54e4854693c2e410fb6f0f9bd37c84d /lbaselib.c | |
parent | 30eebb2d1cc2cdd14426b9e80a9e1c576b955f6b (diff) | |
download | lua-bfdcbbcd76c7187022fe2d35675de0b1c92eeadf.tar.gz lua-bfdcbbcd76c7187022fe2d35675de0b1c92eeadf.tar.bz2 lua-bfdcbbcd76c7187022fe2d35675de0b1c92eeadf.zip |
small optimizations (lua_newtable -> lua_createtable)
Diffstat (limited to 'lbaselib.c')
-rw-r--r-- | lbaselib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbaselib.c,v 1.186 2005/10/21 13:47:42 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.187 2005/12/27 17:10:11 roberto Exp roberto $ |
3 | ** Basic library | 3 | ** Basic library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -625,7 +625,7 @@ static void base_open (lua_State *L) { | |||
625 | auxopen(L, "ipairs", luaB_ipairs, ipairsaux); | 625 | auxopen(L, "ipairs", luaB_ipairs, ipairsaux); |
626 | auxopen(L, "pairs", luaB_pairs, luaB_next); | 626 | auxopen(L, "pairs", luaB_pairs, luaB_next); |
627 | /* `newproxy' needs a weaktable as upvalue */ | 627 | /* `newproxy' needs a weaktable as upvalue */ |
628 | lua_newtable(L); /* new table `w' */ | 628 | lua_createtable(L, 0, 1); /* new table `w' */ |
629 | lua_pushvalue(L, -1); /* `w' will be its own metatable */ | 629 | lua_pushvalue(L, -1); /* `w' will be its own metatable */ |
630 | lua_setmetatable(L, -2); | 630 | lua_setmetatable(L, -2); |
631 | lua_pushliteral(L, "kv"); | 631 | lua_pushliteral(L, "kv"); |