From 14929f5764a7990dfb62c8792cfdfe03c061da21 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 18 Jun 2014 19:59:29 -0300 Subject: use appropriate macros to convert GCObject to specific types --- ltable.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ltable.c') diff --git a/ltable.c b/ltable.c index 18802c9f..3a80d9d0 100644 --- a/ltable.c +++ b/ltable.c @@ -1,5 +1,5 @@ /* -** $Id: ltable.c,v 2.88 2014/04/15 16:32:49 roberto Exp roberto $ +** $Id: ltable.c,v 2.89 2014/05/26 17:10:22 roberto Exp roberto $ ** Lua tables (hash) ** See Copyright Notice in lua.h */ @@ -383,7 +383,8 @@ static void rehash (lua_State *L, Table *t, const TValue *ek) { Table *luaH_new (lua_State *L) { - Table *t = &luaC_newobj(L, LUA_TTABLE, sizeof(Table))->h; + GCObject *o = luaC_newobj(L, LUA_TTABLE, sizeof(Table)); + Table *t = gco2t(o); t->metatable = NULL; t->flags = cast_byte(~0); t->array = NULL; -- cgit v1.2.3-55-g6feb