'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-21 13:02:10 -03:00
parent 3c6d0aaa7d
commit 17ee57f8e0
3 changed files with 9 additions and 9 deletions

4
lvm.c
View File

@@ -1,5 +1,5 @@
/*
** $Id: lvm.c,v 2.218 2014/07/17 12:30:53 roberto Exp roberto $
** $Id: lvm.c,v 2.219 2014/07/18 13:36:14 roberto Exp roberto $
** Lua virtual machine
** See Copyright Notice in lua.h
*/
@@ -549,7 +549,7 @@ static void pushclosure (lua_State *L, Proto *p, UpVal **encup, StkId base,
ncl->upvals[i]->refcount++;
/* new closure is white, so we do not need a barrier here */
}
if (!isblack(obj2gco(p))) /* cache will not break GC invariant? */
if (!isblack(p)) /* cache will not break GC invariant? */
p->cache = ncl; /* save it on cache for reuse */
}