'iswhite' and related macros now can work directly on any object

(no need to convert to 'GCObject')
This commit is contained in:
Roberto Ierusalimschy
2014-07-19 12:14:46 -03:00
parent e43612aaf6
commit 3c6d0aaa7d
3 changed files with 15 additions and 15 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: ltests.c,v 2.179 2014/07/18 13:36:14 roberto Exp roberto $
** $Id: ltests.c,v 2.180 2014/07/18 14:46:47 roberto Exp roberto $
** Internal Module for Debugging of the Lua Implementation
** See Copyright Notice in lua.h
*/
@@ -294,7 +294,7 @@ static void checkstack (global_State *g, lua_State *L1) {
StkId o;
CallInfo *ci;
UpVal *uv;
lua_assert(!isdead(g, obj2gco(L1)));
lua_assert(!isdead(g, L1));
for (uv = L1->openupval; uv != NULL; uv = uv->u.open.next)
lua_assert(upisopen(uv)); /* must be open */
for (ci = L1->ci; ci != NULL; ci = ci->previous) {
@@ -404,7 +404,7 @@ int lua_checkmemory (lua_State *L) {
GCObject *o;
int maybedead;
if (keepinvariant(g)) {
lua_assert(!iswhite(obj2gco(g->mainthread)));
lua_assert(!iswhite(g->mainthread));
lua_assert(!iswhite(gcvalue(&g->l_registry)));
}
lua_assert(!isdead(g, gcvalue(&g->l_registry)));