Add table.new().

This commit is contained in:
Mike Pall
2013-10-09 17:01:22 +02:00
parent 47df3ae513
commit c8cfca0557
11 changed files with 55 additions and 6 deletions

View File

@@ -640,10 +640,8 @@ LUA_API void lua_pushlightuserdata(lua_State *L, void *p)
LUA_API void lua_createtable(lua_State *L, int narray, int nrec)
{
GCtab *t;
lj_gc_check(L);
t = lj_tab_new(L, (uint32_t)(narray > 0 ? narray+1 : 0), hsize2hbits(nrec));
settabV(L, L->top, t);
settabV(L, L->top, lj_tab_new_ah(L, narray, nrec));
incr_top(L);
}