new function 'luaC_runtilstate' to advance GC until a "valid" state

This commit is contained in:
Roberto Ierusalimschy
2009-12-11 17:14:59 -02:00
parent 2e51792596
commit a2a2abcba4
4 changed files with 35 additions and 21 deletions

View File

@@ -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)