diff options
Diffstat (limited to '')
| -rw-r--r-- | src/3rdParty/lua/lobject.h | 17 |
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 */ |
| 158 | typedef StackValue *StkId; | 158 | typedef StackValue *StkId; |
| 159 | 159 | ||
| 160 | |||
| 161 | /* | ||
| 162 | ** When reallocating the stack, change all pointers to the stack into | ||
| 163 | ** proper offsets. | ||
| 164 | */ | ||
| 165 | typedef 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 | */ |
| 618 | typedef struct UpVal { | 629 | typedef 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 */ |
