From 3ad55386c4ed4bf1255e5a15ef439431184a025f Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 21 Oct 2015 16:15:15 -0200 Subject: [PATCH] 'condchangemem' also may need to run 'pre'/'pos' --- lgc.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lgc.h b/lgc.h index 0d77edb5..39691b33 100644 --- a/lgc.h +++ b/lgc.h @@ -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 ** See Copyright Notice in lua.h */ @@ -108,7 +108,8 @@ ** GC cycle on every opportunity) */ #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 */ #define luaC_checkGC(L) luaC_condGC(L,,)