diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-09-11 09:47:48 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-09-11 09:47:48 -0300 |
| commit | d8aa8dd97e14dfd724e997261d305f2045d1ca63 (patch) | |
| tree | 675587d68a41657e6efc6f53334522a2e9b5bf03 /ltests.c | |
| parent | 115087344797d0aafb23f4fe5b902fdebd2c3310 (diff) | |
| download | lua-d8aa8dd97e14dfd724e997261d305f2045d1ca63.tar.gz lua-d8aa8dd97e14dfd724e997261d305f2045d1ca63.tar.bz2 lua-d8aa8dd97e14dfd724e997261d305f2045d1ca63.zip | |
objects in list 'tobefnz' have a GC life-cycle like all others
(specifically they are cleaned during sweep phase)
Diffstat (limited to 'ltests.c')
| -rw-r--r-- | ltests.c | 10 |
1 files changed, 5 insertions, 5 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltests.c,v 2.155 2013/09/05 19:31:49 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.156 2013/09/11 12:26:14 roberto Exp roberto $ |
| 3 | ** Internal Module for Debugging of the Lua Implementation | 3 | ** Internal Module for Debugging of the Lua Implementation |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -469,8 +469,8 @@ int lua_checkmemory (lua_State *L) { | |||
| 469 | /* check 'tobefnz' list */ | 469 | /* check 'tobefnz' list */ |
| 470 | checkgray(g, g->tobefnz); | 470 | checkgray(g, g->tobefnz); |
| 471 | for (o = g->tobefnz; o != NULL; o = gch(o)->next) { | 471 | for (o = g->tobefnz; o != NULL; o = gch(o)->next) { |
| 472 | lua_assert(!iswhite(o) || g->gcstate == GCSpause); | 472 | checkobject(g, o, 0); |
| 473 | lua_assert(!isdead(g, o) && tofinalize(o)); | 473 | lua_assert(tofinalize(o)); |
| 474 | lua_assert(gch(o)->tt == LUA_TUSERDATA || gch(o)->tt == LUA_TTABLE); | 474 | lua_assert(gch(o)->tt == LUA_TUSERDATA || gch(o)->tt == LUA_TTABLE); |
| 475 | } | 475 | } |
| 476 | return 0; | 476 | return 0; |
| @@ -650,8 +650,8 @@ static int gc_local (lua_State *L) { | |||
| 650 | 650 | ||
| 651 | static int gc_state (lua_State *L) { | 651 | static int gc_state (lua_State *L) { |
| 652 | static const char *statenames[] = {"propagate", "atomic", | 652 | static const char *statenames[] = {"propagate", "atomic", |
| 653 | "sweeplocal", "sweeplocfin", "sweepfin", "sweepall", "sweepmainth", | 653 | "sweeplocal", "sweeplocfin", "sweepfin", "sweepall", "sweeptobefnz", |
| 654 | "pause", ""}; | 654 | "sweepmainth", "pause", ""}; |
| 655 | int option = luaL_checkoption(L, 1, "", statenames); | 655 | int option = luaL_checkoption(L, 1, "", statenames); |
| 656 | if (option == GCSpause + 1) { | 656 | if (option == GCSpause + 1) { |
| 657 | lua_pushstring(L, statenames[G(L)->gcstate]); | 657 | lua_pushstring(L, statenames[G(L)->gcstate]); |
