diff options
Diffstat (limited to 'ltests.c')
| -rw-r--r-- | ltests.c | 21 |
1 files changed, 11 insertions, 10 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltests.c,v 2.112 2010/07/28 15:51:59 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.113 2010/11/16 17:43:29 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 | */ |
| @@ -429,20 +429,21 @@ int lua_checkmemory (lua_State *L) { | |||
| 429 | checkobject(g, o); | 429 | checkobject(g, o); |
| 430 | lua_assert(!testbit(o->gch.marked, SEPARATED)); | 430 | lua_assert(!testbit(o->gch.marked, SEPARATED)); |
| 431 | } | 431 | } |
| 432 | /* check 'udgc' list */ | 432 | /* check 'finobj' list */ |
| 433 | checkold(g, g->udgc); | 433 | checkold(g, g->finobj); |
| 434 | for (o = g->udgc; o != NULL; o = gch(o)->next) { | 434 | for (o = g->finobj; o != NULL; o = gch(o)->next) { |
| 435 | lua_assert(gch(o)->tt == LUA_TUSERDATA && | 435 | lua_assert(!isdead(g, o) && testbit(o->gch.marked, SEPARATED)); |
| 436 | !isdead(g, o) && | 436 | lua_assert(gch(o)->tt == LUA_TUSERDATA || |
| 437 | testbit(o->gch.marked, SEPARATED)); | 437 | gch(o)->tt == LUA_TTABLE); |
| 438 | checkobject(g, o); | 438 | checkobject(g, o); |
| 439 | } | 439 | } |
| 440 | /* check 'tobefnz' list */ | 440 | /* check 'tobefnz' list */ |
| 441 | checkold(g, g->tobefnz); | 441 | checkold(g, g->tobefnz); |
| 442 | for (o = g->tobefnz; o != NULL; o = gch(o)->next) { | 442 | for (o = g->tobefnz; o != NULL; o = gch(o)->next) { |
| 443 | lua_assert(gch(o)->tt == LUA_TUSERDATA); | 443 | lua_assert(!iswhite(o)); |
| 444 | lua_assert(isblack(o)); | 444 | lua_assert(!isdead(g, o) && testbit(o->gch.marked, SEPARATED)); |
| 445 | lua_assert(testbit(o->gch.marked, SEPARATED)); | 445 | lua_assert(gch(o)->tt == LUA_TUSERDATA || |
| 446 | gch(o)->tt == LUA_TTABLE); | ||
| 446 | } | 447 | } |
| 447 | /* check 'uvhead' list */ | 448 | /* check 'uvhead' list */ |
| 448 | for (uv = g->uvhead.u.l.next; uv != &g->uvhead; uv = uv->u.l.next) { | 449 | for (uv = g->uvhead.u.l.next; uv != &g->uvhead; uv = uv->u.l.next) { |
