mirror of
https://github.com/lua/lua
synced 2026-09-29 04:35:58 +03:00
slightly better definition for 'isgray'
This commit is contained in:
parent
de97177744
commit
32c1764b5d
1 changed files with 3 additions and 2 deletions
5
lgc.h
5
lgc.h
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue