diff options
Diffstat (limited to 'ldo.h')
-rw-r--r-- | ldo.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -17,6 +17,8 @@ | |||
17 | ** Macro to check stack size and grow stack if needed. Parameters | 17 | ** Macro to check stack size and grow stack if needed. Parameters |
18 | ** 'pre'/'pos' allow the macro to preserve a pointer into the | 18 | ** 'pre'/'pos' allow the macro to preserve a pointer into the |
19 | ** stack across reallocations, doing the work only when needed. | 19 | ** stack across reallocations, doing the work only when needed. |
20 | ** It also allows the running of one GC step when the stack is | ||
21 | ** reallocated. | ||
20 | ** 'condmovestack' is used in heavy tests to force a stack reallocation | 22 | ** 'condmovestack' is used in heavy tests to force a stack reallocation |
21 | ** at every check. | 23 | ** at every check. |
22 | */ | 24 | */ |
@@ -35,7 +37,7 @@ | |||
35 | 37 | ||
36 | 38 | ||
37 | /* macro to check stack size, preserving 'p' */ | 39 | /* macro to check stack size, preserving 'p' */ |
38 | #define checkstackp(L,n,p) \ | 40 | #define checkstackGCp(L,n,p) \ |
39 | luaD_checkstackaux(L, n, \ | 41 | luaD_checkstackaux(L, n, \ |
40 | ptrdiff_t t__ = savestack(L, p); /* save 'p' */ \ | 42 | ptrdiff_t t__ = savestack(L, p); /* save 'p' */ \ |
41 | luaC_checkGC(L), /* stack grow uses memory */ \ | 43 | luaC_checkGC(L), /* stack grow uses memory */ \ |
@@ -44,7 +46,7 @@ | |||
44 | 46 | ||
45 | /* macro to check stack size and GC */ | 47 | /* macro to check stack size and GC */ |
46 | #define checkstackGC(L,fsize) \ | 48 | #define checkstackGC(L,fsize) \ |
47 | luaD_checkstackaux(L, (fsize), (void)0, luaC_checkGC(L)) | 49 | luaD_checkstackaux(L, (fsize), luaC_checkGC(L), (void)0) |
48 | 50 | ||
49 | 51 | ||
50 | /* type of protected functions, to be ran by 'runprotected' */ | 52 | /* type of protected functions, to be ran by 'runprotected' */ |