summaryrefslogtreecommitdiff
path: root/ldo.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-07-07 17:38:29 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-07-07 17:38:29 -0300
commitdbbe0f7971dfe89368224010352d2c08d13ef44f (patch)
tree4aedc09477bda5f47ac6d5370e00c078810c468d /ldo.h
parent0ca522c254911aed6657134959d4f7017dd853e3 (diff)
downloadlua-github-temporary.tar.gz
Fixed bug in 'checkstackp'temporary
The macro 'checkstackp' can run a GC step and destroy a preallocated CallInfo. It has been renamed to 'checkstackGCp' to hint of this collateral effect.
Diffstat (limited to 'ldo.h')
-rw-r--r--ldo.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/ldo.h b/ldo.h
index 821cb779..6c6cb285 100644
--- a/ldo.h
+++ b/ldo.h
@@ -17,6 +17,8 @@
** Macro to check stack size and grow stack if needed. Parameters
** 'pre'/'pos' allow the macro to preserve a pointer into the
** stack across reallocations, doing the work only when needed.
+** It also allows the running of one GC step when the stack is
+** reallocated.
** 'condmovestack' is used in heavy tests to force a stack reallocation
** at every check.
*/
@@ -35,7 +37,7 @@
/* macro to check stack size, preserving 'p' */
-#define checkstackp(L,n,p) \
+#define checkstackGCp(L,n,p) \
luaD_checkstackaux(L, n, \
ptrdiff_t t__ = savestack(L, p); /* save 'p' */ \
luaC_checkGC(L), /* stack grow uses memory */ \