Stack indices changed to union's
That will allow to change pointers to offsets while reallocating the stack.
This commit is contained in:
10
lobject.h
10
lobject.h
@@ -157,6 +157,12 @@ typedef union StackValue {
|
||||
/* index to stack elements */
|
||||
typedef StackValue *StkId;
|
||||
|
||||
|
||||
typedef union {
|
||||
StkId p; /* actual pointer */
|
||||
} StkIdRel;
|
||||
|
||||
|
||||
/* convert a 'StackValue' to a 'TValue' */
|
||||
#define s2v(o) (&(o)->val)
|
||||
|
||||
@@ -618,7 +624,9 @@ typedef struct Proto {
|
||||
typedef struct UpVal {
|
||||
CommonHeader;
|
||||
lu_byte tbc; /* true if it represents a to-be-closed variable */
|
||||
TValue *v; /* points to stack or to its own value */
|
||||
union {
|
||||
TValue *p; /* points to stack or to its own value */
|
||||
} v;
|
||||
union {
|
||||
struct { /* (when open) */
|
||||
struct UpVal *next; /* linked list */
|
||||
|
||||
Reference in New Issue
Block a user