From 4433dbb5f5ac0bb6118bc49ddf061f194c070814 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 24 Mar 2010 10:07:01 -0300 Subject: userdata with finalizers are kept in a separated list ('udgc'), instead of at the end of 'rootgc' (which was renamed to 'allgc', as it is not "root" in the usual meaning for collectors) --- ltests.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ltests.c') diff --git a/ltests.c b/ltests.c index 3d0fa117..123ff64e 100644 --- a/ltests.c +++ b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 2.86 2009/12/22 15:32:50 roberto Exp roberto $ +** $Id: ltests.c,v 2.87 2010/01/13 16:18:25 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -188,7 +188,7 @@ static int testobjref1 (global_State *g, GCObject *f, GCObject *t) { static void printobj (global_State *g, GCObject *o) { int i = 0; GCObject *p; - for (p = g->rootgc; p != o && p != NULL; p = gch(p)->next) i++; + for (p = g->allgc; p != o && p != NULL; p = gch(p)->next) i++; if (p == NULL) i = -1; printf("%d:%s(%p)-%c(%02X)", i, typename(gch(o)->tt), (void *)o, isdead(g,o)?'d':isblack(o)?'b':iswhite(o)?'w':'g', gch(o)->marked); @@ -375,12 +375,12 @@ int lua_checkmemory (lua_State *L) { checkliveness(g, &g->l_registry); lua_assert(!isdead(g, obj2gco(g->l_gt))); checkstack(g, g->mainthread); - for (o = g->rootgc; o != obj2gco(g->mainthread); o = gch(o)->next) { + for (o = g->allgc; o != obj2gco(g->mainthread); o = gch(o)->next) { lua_assert(!testbits(o->gch.marked, bit2mask(SEPARATED, SFIXEDBIT))); checkobject(g, o); } lua_assert(testbit(o->gch.marked, SFIXEDBIT)); - for (o = gch(o)->next; o != NULL; o = gch(o)->next) { + for (o = g->udgc; o != NULL; o = gch(o)->next) { lua_assert(gch(o)->tt == LUA_TUSERDATA && !isdead(g, o) && testbit(o->gch.marked, SEPARATED)); -- cgit v1.2.3-55-g6feb