'luaC_newobj' does not handle special cases; only special case

now is threads, which do not use 'luaC_newobj' anymore.
This commit is contained in:
Roberto Ierusalimschy
2013-09-11 09:26:14 -03:00
parent 79ab21be90
commit 1150873447
6 changed files with 31 additions and 35 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: ltable.c,v 2.81 2013/08/28 18:30:26 roberto Exp roberto $
** $Id: ltable.c,v 2.82 2013/08/29 13:49:57 roberto Exp roberto $
** Lua tables (hash)
** See Copyright Notice in lua.h
*/
@@ -378,7 +378,7 @@ 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), NULL, 0)->h;
Table *t = &luaC_newobj(L, LUA_TTABLE, sizeof(Table))->h;
t->metatable = NULL;
t->flags = cast_byte(~0);
t->array = NULL;