More checks and documentation for uses of EXTRA_STACK

This commit is contained in:
Roberto Ierusalimschy
2022-05-26 15:14:54 -03:00
parent 196bb94d66
commit d61b0c6028
5 changed files with 47 additions and 13 deletions

7
ldo.h
View File

@@ -37,6 +37,13 @@
/* macro to check stack size, preserving 'p' */
#define checkstackp(L,n,p) \
luaD_checkstackaux(L, n, \
ptrdiff_t t__ = savestack(L, p), /* save 'p' */ \
p = restorestack(L, t__)) /* 'pos' part: restore 'p' */
/* macro to check stack size and GC, preserving 'p' */
#define checkstackGCp(L,n,p) \
luaD_checkstackaux(L, n, \
ptrdiff_t t__ = savestack(L, p); /* save 'p' */ \