diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-07-19 11:12:31 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-07-19 11:12:31 -0300 |
| commit | dc07719b0dbc4f2df0f42e34e18be1e0ac4fa2c3 (patch) | |
| tree | 9f9a73b2bccb0b7bf07ac32476e1127f46d222d9 /lobject.h | |
| parent | 9cdf6b7082c49e6bf7daf8c7c4c649bcaacf9fad (diff) | |
| download | lua-dc07719b0dbc4f2df0f42e34e18be1e0ac4fa2c3.tar.gz lua-dc07719b0dbc4f2df0f42e34e18be1e0ac4fa2c3.tar.bz2 lua-dc07719b0dbc4f2df0f42e34e18be1e0ac4fa2c3.zip | |
Tag LUA_TUPVALTBC replaced by a flag
It is simpler to signal a to-be-closed upvalue with a boolean flag,
instead of using a different tag.
Diffstat (limited to 'lobject.h')
| -rw-r--r-- | lobject.h | 4 |
1 files changed, 1 insertions, 3 deletions
| @@ -568,6 +568,7 @@ typedef struct Proto { | |||
| 568 | */ | 568 | */ |
| 569 | typedef struct UpVal { | 569 | typedef struct UpVal { |
| 570 | CommonHeader; | 570 | CommonHeader; |
| 571 | lu_byte tbc; /* true if it represents a to-be-closed variable */ | ||
| 571 | TValue *v; /* points to stack or to its own value */ | 572 | TValue *v; /* points to stack or to its own value */ |
| 572 | union { | 573 | union { |
| 573 | struct { /* (when open) */ | 574 | struct { /* (when open) */ |
| @@ -579,9 +580,6 @@ typedef struct UpVal { | |||
| 579 | } UpVal; | 580 | } UpVal; |
| 580 | 581 | ||
| 581 | 582 | ||
| 582 | /* variant for "To Be Closed" upvalues */ | ||
| 583 | #define LUA_TUPVALTBC (LUA_TUPVAL | (1 << 4)) | ||
| 584 | |||
| 585 | 583 | ||
| 586 | #define ClosureHeader \ | 584 | #define ClosureHeader \ |
| 587 | CommonHeader; lu_byte nupvalues; GCObject *gclist | 585 | CommonHeader; lu_byte nupvalues; GCObject *gclist |
