aboutsummaryrefslogtreecommitdiff
path: root/src/3rdParty/lua/ldo.h
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2022-12-02 10:40:09 +0800
committerLi Jin <dragon-fly@qq.com>2022-12-02 10:40:09 +0800
commit298b18dbe852300199cc529c942a181bead5f135 (patch)
treef4b5ae89b6920fa0a12c693118f85334f19754f8 /src/3rdParty/lua/ldo.h
parenta6a65ba26a9d320611abcbfba49fa724edfb4dad (diff)
downloadyuescript-298b18dbe852300199cc529c942a181bead5f135.tar.gz
yuescript-298b18dbe852300199cc529c942a181bead5f135.tar.bz2
yuescript-298b18dbe852300199cc529c942a181bead5f135.zip
update Lua.
Diffstat (limited to 'src/3rdParty/lua/ldo.h')
-rw-r--r--src/3rdParty/lua/ldo.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/3rdParty/lua/ldo.h b/src/3rdParty/lua/ldo.h
index 4661aa0..1aa446a 100644
--- a/src/3rdParty/lua/ldo.h
+++ b/src/3rdParty/lua/ldo.h
@@ -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' */