1
0
mirror of https://github.com/lua/lua.git synced 2025-02-04 06:13:04 +08:00

'condchangemem' also may need to run 'pre'/'pos'

This commit is contained in:
Roberto Ierusalimschy 2015-10-21 16:15:15 -02:00
parent caf8278710
commit 3ad55386c4

5
lgc.h
View File

@ -1,5 +1,5 @@
/* /*
** $Id: lgc.h,v 2.88 2015/10/20 17:56:21 roberto Exp roberto $ ** $Id: lgc.h,v 2.89 2015/10/20 18:00:19 roberto Exp roberto $
** Garbage Collector ** Garbage Collector
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@ -108,7 +108,8 @@
** GC cycle on every opportunity) ** GC cycle on every opportunity)
*/ */
#define luaC_condGC(L,pre,pos) \ #define luaC_condGC(L,pre,pos) \
{if (G(L)->GCdebt > 0) { pre; luaC_step(L); pos;}; condchangemem(L);} { if (G(L)->GCdebt > 0) { pre; luaC_step(L); pos;}; \
condchangemem(L,pre,pos); }
/* more often than not, 'pre'/'pos' are empty */ /* more often than not, 'pre'/'pos' are empty */
#define luaC_checkGC(L) luaC_condGC(L,,) #define luaC_checkGC(L) luaC_condGC(L,,)