test for whether collector is running moved from function to

macro 'luaC_condGC'.
This commit is contained in:
Roberto Ierusalimschy
2012-05-11 16:22:33 -03:00
parent c2361e0b61
commit 31829ad177
3 changed files with 8 additions and 16 deletions

4
lgc.h
View File

@@ -1,5 +1,5 @@
/*
** $Id: lgc.h,v 2.52 2011/10/03 17:54:25 roberto Exp roberto $
** $Id: lgc.h,v 2.53 2012/01/23 20:29:12 roberto Exp roberto $
** Garbage Collector
** See Copyright Notice in lua.h
*/
@@ -104,7 +104,7 @@
#define luaC_condGC(L,c) \
{if (G(L)->GCdebt > 0) {c;}; condchangemem(L);}
{if (G(L)->GCdebt > 0 && G(L)->gcrunning) {c;}; condchangemem(L);}
#define luaC_checkGC(L) luaC_condGC(L, luaC_step(L);)