diff options
Diffstat (limited to 'ltable.c')
| -rw-r--r-- | ltable.c | 5 |
1 files changed, 2 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltable.c,v 2.45 2009/11/19 17:54:07 roberto Exp roberto $ | 2 | ** $Id: ltable.c,v 2.46 2009/11/26 11:39:20 roberto Exp roberto $ |
| 3 | ** Lua tables (hash) | 3 | ** Lua tables (hash) |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -357,8 +357,7 @@ static void rehash (lua_State *L, Table *t, const TValue *ek) { | |||
| 357 | 357 | ||
| 358 | 358 | ||
| 359 | Table *luaH_new (lua_State *L) { | 359 | Table *luaH_new (lua_State *L) { |
| 360 | Table *t = luaM_new(L, Table); | 360 | Table *t = &luaC_newobj(L, LUA_TTABLE, sizeof(Table), NULL, 0)->h; |
| 361 | luaC_link(L, obj2gco(t), LUA_TTABLE); | ||
| 362 | t->metatable = NULL; | 361 | t->metatable = NULL; |
| 363 | t->flags = cast_byte(~0); | 362 | t->flags = cast_byte(~0); |
| 364 | t->array = NULL; | 363 | t->array = NULL; |
