diff options
Diffstat (limited to 'ldo.h')
-rw-r--r-- | ldo.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -8,6 +8,7 @@ | |||
8 | #define ldo_h | 8 | #define ldo_h |
9 | 9 | ||
10 | 10 | ||
11 | #include "llimits.h" | ||
11 | #include "lobject.h" | 12 | #include "lobject.h" |
12 | #include "lstate.h" | 13 | #include "lstate.h" |
13 | #include "lzio.h" | 14 | #include "lzio.h" |
@@ -23,7 +24,7 @@ | |||
23 | ** at every check. | 24 | ** at every check. |
24 | */ | 25 | */ |
25 | #define luaD_checkstackaux(L,n,pre,pos) \ | 26 | #define luaD_checkstackaux(L,n,pre,pos) \ |
26 | if (l_unlikely(L->stack_last - L->top <= (n))) \ | 27 | if (l_unlikely(L->stack_last.p - L->top.p <= (n))) \ |
27 | { pre; luaD_growstack(L, n, 1); pos; } \ | 28 | { pre; luaD_growstack(L, n, 1); pos; } \ |
28 | else { condmovestack(L,pre,pos); } | 29 | else { condmovestack(L,pre,pos); } |
29 | 30 | ||
@@ -32,8 +33,8 @@ | |||
32 | 33 | ||
33 | 34 | ||
34 | 35 | ||
35 | #define savestack(L,p) ((char *)(p) - (char *)L->stack) | 36 | #define savestack(L,pt) (cast_charp(pt) - cast_charp(L->stack.p)) |
36 | #define restorestack(L,n) ((StkId)((char *)L->stack + (n))) | 37 | #define restorestack(L,n) cast(StkId, cast_charp(L->stack.p) + (n)) |
37 | 38 | ||
38 | 39 | ||
39 | /* macro to check stack size, preserving 'p' */ | 40 | /* macro to check stack size, preserving 'p' */ |