From 5d8b5b9290c932bdfd7dcc670a5af957bdd58392 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 13 Dec 2022 15:45:57 -0300 Subject: Changed signal of GC debt Positive debts seems more natural then negative ones. --- lgc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lgc.h') diff --git a/lgc.h b/lgc.h index 6d82690d..c8f7c6e6 100644 --- a/lgc.h +++ b/lgc.h @@ -175,13 +175,13 @@ /* -** Does one step of collection when debt becomes positive. 'pre'/'pos' +** Does one step of collection when debt becomes zero. 'pre'/'pos' ** allows some adjustments to be done only when needed. macro ** 'condchangemem' is used only for heavy tests (forcing a full ** GC cycle on every opportunity) */ #define luaC_condGC(L,pre,pos) \ - { if (G(L)->GCdebt > 0) { pre; luaC_step(L); pos;}; \ + { if (G(L)->GCdebt <= 0) { pre; luaC_step(L); pos;}; \ condchangemem(L,pre,pos); } /* more often than not, 'pre'/'pos' are empty */ -- cgit v1.2.3-55-g6feb