From dc07719b0dbc4f2df0f42e34e18be1e0ac4fa2c3 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 19 Jul 2019 11:12:31 -0300 Subject: 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. --- lobject.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lobject.h') diff --git a/lobject.h b/lobject.h index f21e8a91..a22148c0 100644 --- a/lobject.h +++ b/lobject.h @@ -568,6 +568,7 @@ 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 { struct { /* (when open) */ @@ -579,9 +580,6 @@ typedef struct UpVal { } UpVal; -/* variant for "To Be Closed" upvalues */ -#define LUA_TUPVALTBC (LUA_TUPVAL | (1 << 4)) - #define ClosureHeader \ CommonHeader; lu_byte nupvalues; GCObject *gclist -- cgit v1.2.3-55-g6feb