allocator function receives the tag of object being allocated in 'osize'

when 'ptr' is NULL.
This commit is contained in:
Roberto Ierusalimschy
2009-12-17 13:46:44 -02:00
parent b3b8dfaaea
commit 0bbdddc86b
8 changed files with 59 additions and 52 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: ltable.c,v 2.45 2009/11/19 17:54:07 roberto Exp roberto $
** $Id: ltable.c,v 2.46 2009/11/26 11:39:20 roberto Exp roberto $
** Lua tables (hash)
** See Copyright Notice in lua.h
*/
@@ -357,8 +357,7 @@ static void rehash (lua_State *L, Table *t, const TValue *ek) {
Table *luaH_new (lua_State *L) {
Table *t = luaM_new(L, Table);
luaC_link(L, obj2gco(t), LUA_TTABLE);
Table *t = &luaC_newobj(L, LUA_TTABLE, sizeof(Table), NULL, 0)->h;
t->metatable = NULL;
t->flags = cast_byte(~0);
t->array = NULL;