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_tab.c | |
parent | 47df3ae5136521da96767e6daed4cdd241de2fa6 (diff) | |
download | luajit-c8cfca05578932567d2c65d59262f398e8acaed2.tar.gz luajit-c8cfca05578932567d2c65d59262f398e8acaed2.tar.bz2 luajit-c8cfca05578932567d2c65d59262f398e8acaed2.zip |
Add table.new().
Diffstat (limited to 'src/lj_tab.c')
-rw-r--r-- | src/lj_tab.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lj_tab.c b/src/lj_tab.c index ccad1f68..496904ee 100644 --- a/src/lj_tab.c +++ b/src/lj_tab.c | |||
@@ -149,6 +149,12 @@ GCtab *lj_tab_new(lua_State *L, uint32_t asize, uint32_t hbits) | |||
149 | return t; | 149 | return t; |
150 | } | 150 | } |
151 | 151 | ||
152 | /* The API of this function conforms to lua_createtable(). */ | ||
153 | GCtab *lj_tab_new_ah(lua_State *L, int32_t a, int32_t h) | ||
154 | { | ||
155 | return lj_tab_new(L, (uint32_t)(a > 0 ? a+1 : 0), hsize2hbits(h)); | ||
156 | } | ||
157 | |||
152 | #if LJ_HASJIT | 158 | #if LJ_HASJIT |
153 | GCtab * LJ_FASTCALL lj_tab_new1(lua_State *L, uint32_t ahsize) | 159 | GCtab * LJ_FASTCALL lj_tab_new1(lua_State *L, uint32_t ahsize) |
154 | { | 160 | { |