aboutsummaryrefslogtreecommitdiff
path: root/lstate.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2008-06-26 16:42:45 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2008-06-26 16:42:45 -0300
commit0c8f5fc2fdcadc8fe6e89c32bf3a1f7456328899 (patch)
tree3c62e2e59064196eca2fe662196e73e3c45b63cd /lstate.c
parent1527d8f00d4a99997cf73f50fe159ddba8681f8f (diff)
downloadlua-0c8f5fc2fdcadc8fe6e89c32bf3a1f7456328899.tar.gz
lua-0c8f5fc2fdcadc8fe6e89c32bf3a1f7456328899.tar.bz2
lua-0c8f5fc2fdcadc8fe6e89c32bf3a1f7456328899.zip
simplification in the handling of finalizers: no more 'tmudata' list +
no more GCSsweeptmu collector's state
Diffstat (limited to 'lstate.c')
-rw-r--r--lstate.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lstate.c b/lstate.c
index a7e1e540..8a672eb8 100644
--- a/lstate.c
+++ b/lstate.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstate.c,v 2.43 2008/02/11 15:45:30 roberto Exp roberto $ 2** $Id: lstate.c,v 2.44 2008/02/19 18:55:09 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*/
@@ -181,7 +181,7 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) {
181 g->gray = NULL; 181 g->gray = NULL;
182 g->grayagain = NULL; 182 g->grayagain = NULL;
183 g->weak = g->ephemeron = g->allweak = NULL; 183 g->weak = g->ephemeron = g->allweak = NULL;
184 g->tmudata = g->tobefnz = NULL; 184 g->tobefnz = NULL;
185 g->totalbytes = sizeof(LG); 185 g->totalbytes = sizeof(LG);
186 g->gcpause = LUAI_GCPAUSE; 186 g->gcpause = LUAI_GCPAUSE;
187 g->gcstepmul = LUAI_GCMUL; 187 g->gcstepmul = LUAI_GCMUL;
@@ -200,7 +200,7 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) {
200 200
201static void callallgcTM (lua_State *L, void *ud) { 201static void callallgcTM (lua_State *L, void *ud) {
202 UNUSED(ud); 202 UNUSED(ud);
203 luaC_callGCTM(L); /* call GC metamethods for all udata */ 203 luaC_callAllGCTM(L); /* call GC metamethods for all udata */
204} 204}
205 205
206 206
@@ -209,7 +209,7 @@ LUA_API void lua_close (lua_State *L) {
209 lua_lock(L); 209 lua_lock(L);
210 luaF_close(L, L->stack); /* close all upvalues for this thread */ 210 luaF_close(L, L->stack); /* close all upvalues for this thread */
211 luaC_separateudata(L, 1); /* separate all udata with GC metamethods */ 211 luaC_separateudata(L, 1); /* separate all udata with GC metamethods */
212 lua_assert(G(L)->tmudata == NULL); 212 lua_assert(L->next == NULL);
213 L->errfunc = 0; /* no error function during GC metamethods */ 213 L->errfunc = 0; /* no error function during GC metamethods */
214 do { /* repeat until no more errors */ 214 do { /* repeat until no more errors */
215 L->ci = L->base_ci; 215 L->ci = L->base_ci;