diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-05-07 15:43:51 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-05-07 15:43:51 -0300 |
| commit | 32c1764b5d5e092869de4bad7b3182270497d511 (patch) | |
| tree | f3daafbe7f3c432da8a64eb37e8bff564ee3db85 | |
| parent | de97177744cee0c81bf9193ce9601a978636a1ea (diff) | |
| download | lua-32c1764b5d5e092869de4bad7b3182270497d511.tar.gz lua-32c1764b5d5e092869de4bad7b3182270497d511.tar.bz2 lua-32c1764b5d5e092869de4bad7b3182270497d511.zip | |
slightly better definition for 'isgray'
| -rw-r--r-- | lgc.h | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -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 | ||
