From 55ac40f859ad8e28fe71a8801d49f4a4140e8aa3 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 20 Jun 2024 13:43:33 -0300 Subject: Cleaning of llimits.h Several definitions that don't need to be "global" (that is, that concerns only specific parts of the code) moved out of llimits.h, to more appropriate places. --- lgc.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lgc.h') diff --git a/lgc.h b/lgc.h index 72d318ca..5b71ddb9 100644 --- a/lgc.h +++ b/lgc.h @@ -211,6 +211,14 @@ ** 'condchangemem' is used only for heavy tests (forcing a full ** GC cycle on every opportunity) */ + +#if !defined(HARDMEMTESTS) +#define condchangemem(L,pre,pos) ((void)0) +#else +#define condchangemem(L,pre,pos) \ + { if (gcrunning(G(L))) { pre; luaC_fullgc(L, 0); pos; } } +#endif + #define luaC_condGC(L,pre,pos) \ { if (G(L)->GCdebt <= 0) { pre; luaC_step(L); pos;}; \ condchangemem(L,pre,pos); } -- cgit v1.2.3-55-g6feb