aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-05-07 15:43:51 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-05-07 15:43:51 -0300
commit32c1764b5d5e092869de4bad7b3182270497d511 (patch)
treef3daafbe7f3c432da8a64eb37e8bff564ee3db85
parentde97177744cee0c81bf9193ce9601a978636a1ea (diff)
downloadlua-32c1764b5d5e092869de4bad7b3182270497d511.tar.gz
lua-32c1764b5d5e092869de4bad7b3182270497d511.tar.bz2
lua-32c1764b5d5e092869de4bad7b3182270497d511.zip
slightly better definition for 'isgray'
-rw-r--r--lgc.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/lgc.h b/lgc.h
index 3b279c94..c8aed91c 100644
--- a/lgc.h
+++ b/lgc.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lgc.h,v 2.37 2010/05/06 18:17:22 roberto Exp roberto $ 2** $Id: lgc.h,v 2.38 2010/05/07 18:08:05 roberto Exp roberto $
3** Garbage Collector 3** Garbage Collector
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -86,7 +86,8 @@
86 86
87#define iswhite(x) testbits((x)->gch.marked, WHITEBITS) 87#define iswhite(x) testbits((x)->gch.marked, WHITEBITS)
88#define isblack(x) testbit((x)->gch.marked, BLACKBIT) 88#define isblack(x) testbit((x)->gch.marked, BLACKBIT)
89#define isgray(x) (!isblack(x) && !iswhite(x)) 89#define isgray(x) /* neither white nor black */ \
90 (!testbits((x)->gch.marked, WHITEBITS | bitmask(BLACKBIT)))
90 91
91#define isold(x) testbit((x)->gch.marked, OLDBIT) 92#define isold(x) testbit((x)->gch.marked, OLDBIT)
92 93