aboutsummaryrefslogtreecommitdiff
path: root/lgc.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-06-20 13:43:33 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-06-20 13:43:33 -0300
commit55ac40f859ad8e28fe71a8801d49f4a4140e8aa3 (patch)
tree1a1f02de45d28c7eb8976087ade773d7937bed14 /lgc.h
parent97ef8e7bd40340d47a9789beb06f0128d7438d0a (diff)
downloadlua-55ac40f859ad8e28fe71a8801d49f4a4140e8aa3.tar.gz
lua-55ac40f859ad8e28fe71a8801d49f4a4140e8aa3.tar.bz2
lua-55ac40f859ad8e28fe71a8801d49f4a4140e8aa3.zip
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.
Diffstat (limited to 'lgc.h')
-rw-r--r--lgc.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lgc.h b/lgc.h
index 72d318ca..5b71ddb9 100644
--- a/lgc.h
+++ b/lgc.h
@@ -211,6 +211,14 @@
211** 'condchangemem' is used only for heavy tests (forcing a full 211** 'condchangemem' is used only for heavy tests (forcing a full
212** GC cycle on every opportunity) 212** GC cycle on every opportunity)
213*/ 213*/
214
215#if !defined(HARDMEMTESTS)
216#define condchangemem(L,pre,pos) ((void)0)
217#else
218#define condchangemem(L,pre,pos) \
219 { if (gcrunning(G(L))) { pre; luaC_fullgc(L, 0); pos; } }
220#endif
221
214#define luaC_condGC(L,pre,pos) \ 222#define luaC_condGC(L,pre,pos) \
215 { if (G(L)->GCdebt <= 0) { pre; luaC_step(L); pos;}; \ 223 { if (G(L)->GCdebt <= 0) { pre; luaC_step(L); pos;}; \
216 condchangemem(L,pre,pos); } 224 condchangemem(L,pre,pos); }