From d61b0c60287c38008d312ddd11724a15b1737f7b Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 26 May 2022 15:14:54 -0300 Subject: More checks and documentation for uses of EXTRA_STACK --- ldo.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ldo.h') diff --git a/ldo.h b/ldo.h index 4cbdb847..4661aa00 100644 --- a/ldo.h +++ b/ldo.h @@ -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' */ \ -- cgit v1.2.3-55-g6feb