diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-07-07 17:38:29 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-07-07 17:38:29 -0300 |
commit | dbbe0f7971dfe89368224010352d2c08d13ef44f (patch) | |
tree | 4aedc09477bda5f47ac6d5370e00c078810c468d /ldo.h | |
parent | 0ca522c254911aed6657134959d4f7017dd853e3 (diff) | |
download | lua-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.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 */ \ |