diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-01-19 13:54:26 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-01-19 13:54:26 -0200 |
commit | 621ef9f7675829234e75b0b3e73afc7a1a74aa16 (patch) | |
tree | 5ced360a5af2f8dd0b57fc6849148b6dffa5c12a /lgc.h | |
parent | d89a56f86921dc3c62edf0345748ba5c41b2632c (diff) | |
download | lua-621ef9f7675829234e75b0b3e73afc7a1a74aa16.tar.gz lua-621ef9f7675829234e75b0b3e73afc7a1a74aa16.tar.bz2 lua-621ef9f7675829234e75b0b3e73afc7a1a74aa16.zip |
better control over GC collors of upvalues
Diffstat (limited to 'lgc.h')
-rw-r--r-- | lgc.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lgc.h,v 2.8 2004/08/30 13:44:44 roberto Exp roberto $ | 2 | ** $Id: lgc.h,v 2.9 2004/09/15 20:38:15 roberto Exp $ |
3 | ** Garbage Collector | 3 | ** Garbage Collector |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -66,6 +66,7 @@ | |||
66 | #define isdead(g,v) ((v)->gch.marked & otherwhite(g)) | 66 | #define isdead(g,v) ((v)->gch.marked & otherwhite(g)) |
67 | 67 | ||
68 | #define changewhite(x) ((x)->gch.marked ^= bit2mask(WHITE0BIT, WHITE1BIT)) | 68 | #define changewhite(x) ((x)->gch.marked ^= bit2mask(WHITE0BIT, WHITE1BIT)) |
69 | #define gray2black(x) setbit((x)->gch.marked, BLACKBIT) | ||
69 | 70 | ||
70 | #define valiswhite(x) (iscollectable(x) && iswhite(gcvalue(x))) | 71 | #define valiswhite(x) (iscollectable(x) && iswhite(gcvalue(x))) |
71 | 72 | ||