diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-12-16 14:42:58 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-12-16 14:42:58 -0200 |
commit | 2af0d3b4598060b1086884cfb879d39fa4e0c89a (patch) | |
tree | bc9b53d4fcc3e5f0dce4ecbfcb568a3948ff9f9d /lstate.c | |
parent | 9fbe0690fb0d8a64de9046a9c28d08f93e83af2a (diff) | |
download | lua-2af0d3b4598060b1086884cfb879d39fa4e0c89a.tar.gz lua-2af0d3b4598060b1086884cfb879d39fa4e0c89a.tar.bz2 lua-2af0d3b4598060b1086884cfb879d39fa4e0c89a.zip |
allocator function receives the tag of object being allocated in 'osize'
when 'ptr' is NULL.
Diffstat (limited to 'lstate.c')
-rw-r--r-- | lstate.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstate.c,v 2.64 2009/11/18 13:13:47 roberto Exp roberto $ | 2 | ** $Id: lstate.c,v 2.65 2009/12/14 15:27:30 roberto Exp roberto $ |
3 | ** Global State | 3 | ** Global State |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -192,8 +192,7 @@ LUA_API lua_State *lua_newthread (lua_State *L) { | |||
192 | lua_State *L1; | 192 | lua_State *L1; |
193 | lua_lock(L); | 193 | lua_lock(L); |
194 | luaC_checkGC(L); | 194 | luaC_checkGC(L); |
195 | L1 = &luaM_new(L, LX)->l; | 195 | L1 = &luaC_newobj(L, LUA_TTHREAD, sizeof(LX), NULL, offsetof(LX, l))->th; |
196 | luaC_link(L, obj2gco(L1), LUA_TTHREAD); | ||
197 | setthvalue(L, L->top, L1); | 196 | setthvalue(L, L->top, L1); |
198 | api_incr_top(L); | 197 | api_incr_top(L); |
199 | preinit_state(L1, G(L)); | 198 | preinit_state(L1, G(L)); |