slightly better definition for 'isgray'

This commit is contained in:
Roberto Ierusalimschy 2010-05-07 15:43:51 -03:00
parent de97177744
commit 32c1764b5d
1 changed files with 3 additions and 2 deletions

5
lgc.h
View File

@ -1,5 +1,5 @@
/*
** $Id: lgc.h,v 2.37 2010/05/06 18:17:22 roberto Exp roberto $
** $Id: lgc.h,v 2.38 2010/05/07 18:08:05 roberto Exp roberto $
** Garbage Collector
** See Copyright Notice in lua.h
*/
@ -86,7 +86,8 @@
#define iswhite(x) testbits((x)->gch.marked, WHITEBITS)
#define isblack(x) testbit((x)->gch.marked, BLACKBIT)
#define isgray(x) (!isblack(x) && !iswhite(x))
#define isgray(x) /* neither white nor black */ \
(!testbits((x)->gch.marked, WHITEBITS | bitmask(BLACKBIT)))
#define isold(x) testbit((x)->gch.marked, OLDBIT)