aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ltests.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/ltests.c b/ltests.c
index 48fd8e23..2a45dc7e 100644
--- a/ltests.c
+++ b/ltests.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.c,v 2.182 2014/07/23 16:44:30 roberto Exp roberto $ 2** $Id: ltests.c,v 2.183 2014/08/01 17:33:08 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*/
@@ -598,9 +598,12 @@ static int gc_color (lua_State *L) {
598 o = obj_at(L, 1); 598 o = obj_at(L, 1);
599 if (!iscollectable(o)) 599 if (!iscollectable(o))
600 lua_pushstring(L, "no collectable"); 600 lua_pushstring(L, "no collectable");
601 else 601 else {
602 lua_pushstring(L, iswhite(gcvalue(o)) ? "white" : 602 GCObject *obj = gcvalue(o);
603 isblack(gcvalue(o)) ? "black" : "grey"); 603 lua_pushstring(L, isdead(G(L), obj) ? "dead" :
604 iswhite(obj) ? "white" :
605 isblack(obj) ? "black" : "grey");
606 }
604 return 1; 607 return 1;
605} 608}
606 609