diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-12-17 13:46:44 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-12-17 13:46:44 -0200 |
commit | 0bbdddc86b1353fec36ae886b4142986f3c4713f (patch) | |
tree | 9eb933c8123911f9477e8b8b55344035c8077c01 /ltable.c | |
parent | b3b8dfaaea2dba7e7b4b898a5f767a80f36319f1 (diff) | |
download | lua-0bbdddc86b1353fec36ae886b4142986f3c4713f.tar.gz lua-0bbdddc86b1353fec36ae886b4142986f3c4713f.tar.bz2 lua-0bbdddc86b1353fec36ae886b4142986f3c4713f.zip |
allocator function receives the tag of object being allocated in 'osize'
when 'ptr' is NULL.
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; |