diff options
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 1.245 2003/10/07 20:13:41 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 1.246 2003/10/10 12:57:55 roberto Exp roberto $ |
3 | ** Lua API | 3 | ** Lua API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -532,10 +532,10 @@ LUA_API void lua_rawgeti (lua_State *L, int idx, int n) { | |||
532 | } | 532 | } |
533 | 533 | ||
534 | 534 | ||
535 | LUA_API void lua_newtable (lua_State *L) { | 535 | LUA_API void lua_createtable (lua_State *L, int narray, int nrec) { |
536 | lua_lock(L); | 536 | lua_lock(L); |
537 | luaC_checkGC(L); | 537 | luaC_checkGC(L); |
538 | sethvalue(L->top, luaH_new(L, 0, 0)); | 538 | sethvalue(L->top, luaH_new(L, narray, luaO_log2(nrec) + 1)); |
539 | api_incr_top(L); | 539 | api_incr_top(L); |
540 | lua_unlock(L); | 540 | lua_unlock(L); |
541 | } | 541 | } |