aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/ltests.c b/ltests.c
index 4e087435..e99b2b61 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 2.141 2013/08/07 12:18:11 roberto Exp roberto $ 2** $Id: ltests.c,v 2.142 2013/08/16 18:55:49 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*/
@@ -244,10 +244,8 @@ static int testobjref (global_State *g, GCObject *f, GCObject *t) {
244 244
245 245
246static void checkvalref (global_State *g, GCObject *f, const TValue *t) { 246static void checkvalref (global_State *g, GCObject *f, const TValue *t) {
247 if (iscollectable(t)) { 247 lua_assert(!iscollectable(t) ||
248 lua_assert(righttt(t)); 248 (righttt(t) && testobjref(g, f, gcvalue(t))));
249 lua_assert(testobjref(g, f, gcvalue(t)));
250 }
251} 249}
252 250
253 251
@@ -354,8 +352,7 @@ static void checkobject (global_State *g, GCObject *o, int maybedead) {
354 if (isdead(g, o)) 352 if (isdead(g, o))
355 lua_assert(maybedead); 353 lua_assert(maybedead);
356 else { 354 else {
357 if (g->gcstate == GCSpause) 355 lua_assert(g->gcstate != GCSpause || iswhite(o));
358 lua_assert(iswhite(o));
359 switch (gch(o)->tt) { 356 switch (gch(o)->tt) {
360 case LUA_TUPVAL: { 357 case LUA_TUPVAL: {
361 UpVal *uv = gco2uv(o); 358 UpVal *uv = gco2uv(o);