diff options
author | Mike Pall <mike> | 2013-10-09 17:01:22 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2013-10-09 17:02:01 +0200 |
commit | c8cfca05578932567d2c65d59262f398e8acaed2 (patch) | |
tree | 5699e7f2df3a5166eee667b0971775cea6c0ab4b /src/lj_api.c | |
parent | 47df3ae5136521da96767e6daed4cdd241de2fa6 (diff) | |
download | luajit-c8cfca05578932567d2c65d59262f398e8acaed2.tar.gz luajit-c8cfca05578932567d2c65d59262f398e8acaed2.tar.bz2 luajit-c8cfca05578932567d2c65d59262f398e8acaed2.zip |
Add table.new().
Diffstat (limited to 'src/lj_api.c')
-rw-r--r-- | src/lj_api.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lj_api.c b/src/lj_api.c index 8aaafdc5..05fb41a7 100644 --- a/src/lj_api.c +++ b/src/lj_api.c | |||
@@ -640,10 +640,8 @@ LUA_API void lua_pushlightuserdata(lua_State *L, void *p) | |||
640 | 640 | ||
641 | LUA_API void lua_createtable(lua_State *L, int narray, int nrec) | 641 | LUA_API void lua_createtable(lua_State *L, int narray, int nrec) |
642 | { | 642 | { |
643 | GCtab *t; | ||
644 | lj_gc_check(L); | 643 | lj_gc_check(L); |
645 | t = lj_tab_new(L, (uint32_t)(narray > 0 ? narray+1 : 0), hsize2hbits(nrec)); | 644 | settabV(L, L->top, lj_tab_new_ah(L, narray, nrec)); |
646 | settabV(L, L->top, t); | ||
647 | incr_top(L); | 645 | incr_top(L); |
648 | } | 646 | } |
649 | 647 | ||