From a2a2abcba4b3a221780a4499880aa16bf76e8204 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 11 Dec 2009 17:14:59 -0200 Subject: new function 'luaC_runtilstate' to advance GC until a "valid" state --- ltests.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ltests.c') diff --git a/ltests.c b/ltests.c index 29908c1c..0e1c9226 100644 --- a/ltests.c +++ b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 2.81 2009/12/01 16:49:48 roberto Exp roberto $ +** $Id: ltests.c,v 2.82 2009/12/10 18:21:28 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -167,6 +167,9 @@ void *debug_realloc (void *ud, void *block, size_t oldsize, size_t size) { ** ======================================================= */ +#define issweep(g) (GCSsweepstring <= (g)->gcstate && (g)->gcstate <= GCSsweep) + + static int testobjref1 (global_State *g, GCObject *f, GCObject *t) { if (isdead(g,t)) return 0; if (g->gcstate == GCSpropagate) -- cgit v1.2.3-55-g6feb