diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-12-11 17:14:59 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-12-11 17:14:59 -0200 |
commit | a2a2abcba4b3a221780a4499880aa16bf76e8204 (patch) | |
tree | 939f2fb27e61bc5171118e0d45659b4a209de566 /ltests.c | |
parent | 2e5179259655ffd137067f5dc47803740b7937ac (diff) | |
download | lua-a2a2abcba4b3a221780a4499880aa16bf76e8204.tar.gz lua-a2a2abcba4b3a221780a4499880aa16bf76e8204.tar.bz2 lua-a2a2abcba4b3a221780a4499880aa16bf76e8204.zip |
new function 'luaC_runtilstate' to advance GC until a "valid" state
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.c,v 2.81 2009/12/01 16:49:48 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.82 2009/12/10 18:21:28 roberto Exp roberto $ |
3 | ** Internal Module for Debugging of the Lua Implementation | 3 | ** Internal Module for Debugging of the Lua Implementation |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -167,6 +167,9 @@ void *debug_realloc (void *ud, void *block, size_t oldsize, size_t size) { | |||
167 | ** ======================================================= | 167 | ** ======================================================= |
168 | */ | 168 | */ |
169 | 169 | ||
170 | #define issweep(g) (GCSsweepstring <= (g)->gcstate && (g)->gcstate <= GCSsweep) | ||
171 | |||
172 | |||
170 | static int testobjref1 (global_State *g, GCObject *f, GCObject *t) { | 173 | static int testobjref1 (global_State *g, GCObject *f, GCObject *t) { |
171 | if (isdead(g,t)) return 0; | 174 | if (isdead(g,t)) return 0; |
172 | if (g->gcstate == GCSpropagate) | 175 | if (g->gcstate == GCSpropagate) |