From c006f085d98923e505c7fe8909944d3c182f8301 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 10 May 2010 13:46:49 -0300 Subject: new macro 'resetoldbit' --- lgc.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lgc.h') diff --git a/lgc.h b/lgc.h index c8aed91c..938a1d49 100644 --- a/lgc.h +++ b/lgc.h @@ -1,5 +1,5 @@ /* -** $Id: lgc.h,v 2.38 2010/05/07 18:08:05 roberto Exp roberto $ +** $Id: lgc.h,v 2.39 2010/05/07 18:43:51 roberto Exp roberto $ ** Garbage Collector ** See Copyright Notice in lua.h */ @@ -80,6 +80,7 @@ #define SEPARATED 4 /* " ": it's in 'udgc' list or in 'tobefnz' */ #define FIXEDBIT 5 /* object is fixed (should not be collected) */ #define OLDBIT 6 /* object is old (only in generational mode) */ +/* bit 7 is currently used by tests (luaL_checkmemory) */ #define WHITEBITS bit2mask(WHITE0BIT, WHITE1BIT) @@ -90,6 +91,7 @@ (!testbits((x)->gch.marked, WHITEBITS | bitmask(BLACKBIT))) #define isold(x) testbit((x)->gch.marked, OLDBIT) +#define resetoldbit(o) resetbit((o)->gch.marked, OLDBIT) #define otherwhite(g) (g->currentwhite ^ WHITEBITS) #define isdeadm(ow,m) (!(((m) ^ WHITEBITS) & (ow))) -- cgit v1.2.3-55-g6feb