aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/ltests.c b/ltests.c
index 6dba514a..ac177de8 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 2.210 2016/11/07 12:38:35 roberto Exp roberto $ 2** $Id: ltests.c,v 2.211 2016/12/04 20:17:24 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*/
@@ -195,9 +195,13 @@ static int testobjref1 (global_State *g, GCObject *f, GCObject *t) {
195 195
196 196
197static void printobj (global_State *g, GCObject *o) { 197static void printobj (global_State *g, GCObject *o) {
198 printf("||%s(%p)-%c(%02X)||", 198 printf("||%s(%p)-%c%c(%02X)||",
199 ttypename(novariant(o->tt)), (void *)o, 199 ttypename(novariant(o->tt)), (void *)o,
200 isdead(g,o)?'d':isblack(o)?'b':iswhite(o)?'w':'g', o->marked); 200 isdead(g,o) ? 'd' : isblack(o) ? 'b' : iswhite(o) ? 'w' : 'g',
201 testbit(o->marked, OLDBIT) ? 'o' : 'n',
202 o->marked);
203 if (o->tt == LUA_TSHRSTR || o->tt == LUA_TLNGSTR)
204 printf(" '%s'", getstr(gco2ts(o)));
201} 205}
202 206
203 207
@@ -364,8 +368,6 @@ static void checkobject (global_State *g, GCObject *o, int maybedead) {
364} 368}
365 369
366 370
367#define TESTGRAYBIT 7
368
369static void checkgraylist (global_State *g, GCObject *o) { 371static void checkgraylist (global_State *g, GCObject *o) {
370 ((void)g); /* better to keep it available if we need to print an object */ 372 ((void)g); /* better to keep it available if we need to print an object */
371 while (o) { 373 while (o) {