aboutsummaryrefslogtreecommitdiff
path: root/src/3rdParty/lua/lobject.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/lobject.h
parenta6a65ba26a9d320611abcbfba49fa724edfb4dad (diff)
downloadyuescript-298b18dbe852300199cc529c942a181bead5f135.tar.gz
yuescript-298b18dbe852300199cc529c942a181bead5f135.tar.bz2
yuescript-298b18dbe852300199cc529c942a181bead5f135.zip
update Lua.
Diffstat (limited to 'src/3rdParty/lua/lobject.h')
-rw-r--r--src/3rdParty/lua/lobject.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/3rdParty/lua/lobject.h b/src/3rdParty/lua/lobject.h
index 77cc606..556608e 100644
--- a/src/3rdParty/lua/lobject.h
+++ b/src/3rdParty/lua/lobject.h
@@ -157,6 +157,17 @@ typedef union StackValue {
157/* index to stack elements */ 157/* index to stack elements */
158typedef StackValue *StkId; 158typedef StackValue *StkId;
159 159
160
161/*
162** When reallocating the stack, change all pointers to the stack into
163** proper offsets.
164*/
165typedef union {
166 StkId p; /* actual pointer */
167 ptrdiff_t offset; /* used while the stack is being reallocated */
168} StkIdRel;
169
170
160/* convert a 'StackValue' to a 'TValue' */ 171/* convert a 'StackValue' to a 'TValue' */
161#define s2v(o) (&(o)->val) 172#define s2v(o) (&(o)->val)
162 173
@@ -617,8 +628,10 @@ typedef struct Proto {
617*/ 628*/
618typedef struct UpVal { 629typedef struct UpVal {
619 CommonHeader; 630 CommonHeader;
620 lu_byte tbc; /* true if it represents a to-be-closed variable */ 631 union {
621 TValue *v; /* points to stack or to its own value */ 632 TValue *p; /* points to stack or to its own value */
633 ptrdiff_t offset; /* used while the stack is being reallocated */
634 } v;
622 union { 635 union {
623 struct { /* (when open) */ 636 struct { /* (when open) */
624 struct UpVal *next; /* linked list */ 637 struct UpVal *next; /* linked list */