diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-05-26 15:14:54 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-05-26 15:14:54 -0300 |
commit | d61b0c60287c38008d312ddd11724a15b1737f7b (patch) | |
tree | cbba214daaf712ac78547d136aa24b12d1308294 /ldo.h | |
parent | 196bb94d66e727e0aec053a0276c3ad701500762 (diff) | |
download | lua-d61b0c60287c38008d312ddd11724a15b1737f7b.tar.gz lua-d61b0c60287c38008d312ddd11724a15b1737f7b.tar.bz2 lua-d61b0c60287c38008d312ddd11724a15b1737f7b.zip |
More checks and documentation for uses of EXTRA_STACK
Diffstat (limited to 'ldo.h')
-rw-r--r-- | ldo.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -37,6 +37,13 @@ | |||
37 | 37 | ||
38 | 38 | ||
39 | /* macro to check stack size, preserving 'p' */ | 39 | /* macro to check stack size, preserving 'p' */ |
40 | #define checkstackp(L,n,p) \ | ||
41 | luaD_checkstackaux(L, n, \ | ||
42 | ptrdiff_t t__ = savestack(L, p), /* save 'p' */ \ | ||
43 | p = restorestack(L, t__)) /* 'pos' part: restore 'p' */ | ||
44 | |||
45 | |||
46 | /* macro to check stack size and GC, preserving 'p' */ | ||
40 | #define checkstackGCp(L,n,p) \ | 47 | #define checkstackGCp(L,n,p) \ |
41 | luaD_checkstackaux(L, n, \ | 48 | luaD_checkstackaux(L, n, \ |
42 | ptrdiff_t t__ = savestack(L, p); /* save 'p' */ \ | 49 | ptrdiff_t t__ = savestack(L, p); /* save 'p' */ \ |