diff options
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.c,v 2.86 2009/12/22 15:32:50 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.87 2010/01/13 16:18:25 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 | */ |
@@ -188,7 +188,7 @@ static int testobjref1 (global_State *g, GCObject *f, GCObject *t) { | |||
188 | static void printobj (global_State *g, GCObject *o) { | 188 | static void printobj (global_State *g, GCObject *o) { |
189 | int i = 0; | 189 | int i = 0; |
190 | GCObject *p; | 190 | GCObject *p; |
191 | for (p = g->rootgc; p != o && p != NULL; p = gch(p)->next) i++; | 191 | for (p = g->allgc; p != o && p != NULL; p = gch(p)->next) i++; |
192 | if (p == NULL) i = -1; | 192 | if (p == NULL) i = -1; |
193 | printf("%d:%s(%p)-%c(%02X)", i, typename(gch(o)->tt), (void *)o, | 193 | printf("%d:%s(%p)-%c(%02X)", i, typename(gch(o)->tt), (void *)o, |
194 | isdead(g,o)?'d':isblack(o)?'b':iswhite(o)?'w':'g', gch(o)->marked); | 194 | isdead(g,o)?'d':isblack(o)?'b':iswhite(o)?'w':'g', gch(o)->marked); |
@@ -375,12 +375,12 @@ int lua_checkmemory (lua_State *L) { | |||
375 | checkliveness(g, &g->l_registry); | 375 | checkliveness(g, &g->l_registry); |
376 | lua_assert(!isdead(g, obj2gco(g->l_gt))); | 376 | lua_assert(!isdead(g, obj2gco(g->l_gt))); |
377 | checkstack(g, g->mainthread); | 377 | checkstack(g, g->mainthread); |
378 | for (o = g->rootgc; o != obj2gco(g->mainthread); o = gch(o)->next) { | 378 | for (o = g->allgc; o != obj2gco(g->mainthread); o = gch(o)->next) { |
379 | lua_assert(!testbits(o->gch.marked, bit2mask(SEPARATED, SFIXEDBIT))); | 379 | lua_assert(!testbits(o->gch.marked, bit2mask(SEPARATED, SFIXEDBIT))); |
380 | checkobject(g, o); | 380 | checkobject(g, o); |
381 | } | 381 | } |
382 | lua_assert(testbit(o->gch.marked, SFIXEDBIT)); | 382 | lua_assert(testbit(o->gch.marked, SFIXEDBIT)); |
383 | for (o = gch(o)->next; o != NULL; o = gch(o)->next) { | 383 | for (o = g->udgc; o != NULL; o = gch(o)->next) { |
384 | lua_assert(gch(o)->tt == LUA_TUSERDATA && | 384 | lua_assert(gch(o)->tt == LUA_TUSERDATA && |
385 | !isdead(g, o) && | 385 | !isdead(g, o) && |
386 | testbit(o->gch.marked, SEPARATED)); | 386 | testbit(o->gch.marked, SEPARATED)); |