From 2af0d3b4598060b1086884cfb879d39fa4e0c89a Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 16 Dec 2009 14:42:58 -0200 Subject: allocator function receives the tag of object being allocated in 'osize' when 'ptr' is NULL. --- lstate.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lstate.c') diff --git a/lstate.c b/lstate.c index 5e1ca9a6..07d5be25 100644 --- a/lstate.c +++ b/lstate.c @@ -1,5 +1,5 @@ /* -** $Id: lstate.c,v 2.64 2009/11/18 13:13:47 roberto Exp roberto $ +** $Id: lstate.c,v 2.65 2009/12/14 15:27:30 roberto Exp roberto $ ** Global State ** See Copyright Notice in lua.h */ @@ -192,8 +192,7 @@ LUA_API lua_State *lua_newthread (lua_State *L) { lua_State *L1; lua_lock(L); luaC_checkGC(L); - L1 = &luaM_new(L, LX)->l; - luaC_link(L, obj2gco(L1), LUA_TTHREAD); + L1 = &luaC_newobj(L, LUA_TTHREAD, sizeof(LX), NULL, offsetof(LX, l))->th; setthvalue(L, L->top, L1); api_incr_top(L); preinit_state(L1, G(L)); -- cgit v1.2.3-55-g6feb