diff options
Diffstat (limited to 'ltable.c')
| -rw-r--r-- | ltable.c | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltable.c,v 2.88 2014/04/15 16:32:49 roberto Exp roberto $ | 2 | ** $Id: ltable.c,v 2.89 2014/05/26 17:10:22 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 | */ |
| @@ -383,7 +383,8 @@ static void rehash (lua_State *L, Table *t, const TValue *ek) { | |||
| 383 | 383 | ||
| 384 | 384 | ||
| 385 | Table *luaH_new (lua_State *L) { | 385 | Table *luaH_new (lua_State *L) { |
| 386 | Table *t = &luaC_newobj(L, LUA_TTABLE, sizeof(Table))->h; | 386 | GCObject *o = luaC_newobj(L, LUA_TTABLE, sizeof(Table)); |
| 387 | Table *t = gco2t(o); | ||
| 387 | t->metatable = NULL; | 388 | t->metatable = NULL; |
| 388 | t->flags = cast_byte(~0); | 389 | t->flags = cast_byte(~0); |
| 389 | t->array = NULL; | 390 | t->array = NULL; |
