Skip to content

Commit be908a7

Browse files
committed
Removed unused field 'UpVal.tbc'
1 parent 9ede317 commit be908a7

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

lfunc.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,11 @@ void luaF_initupvals (lua_State *L, LClosure *cl) {
6262
** Create a new upvalue at the given level, and link it to the list of
6363
** open upvalues of 'L' after entry 'prev'.
6464
**/
65-
static UpVal *newupval (lua_State *L, int tbc, StkId level, UpVal **prev) {
65+
static UpVal *newupval (lua_State *L, StkId level, UpVal **prev) {
6666
GCObject *o = luaC_newobj(L, LUA_VUPVAL, sizeof(UpVal));
6767
UpVal *uv = gco2upv(o);
6868
UpVal *next = *prev;
6969
uv->v.p = s2v(level); /* current value lives in the stack */
70-
uv->tbc = tbc;
7170
uv->u.open.next = next; /* link it to list of open upvalues */
7271
uv->u.open.previous = prev;
7372
if (next)
@@ -96,7 +95,7 @@ UpVal *luaF_findupval (lua_State *L, StkId level) {
9695
pp = &p->u.open.next;
9796
}
9897
/* not found: create a new upvalue after 'pp' */
99-
return newupval(L, 0, level, pp);
98+
return newupval(L, level, pp);
10099
}
101100

102101

lobject.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,6 @@ typedef struct Proto {
628628
*/
629629
typedef struct UpVal {
630630
CommonHeader;
631-
lu_byte tbc; /* true if it represents a to-be-closed variable */
632631
union {
633632
TValue *p; /* points to stack or to its own value */
634633
ptrdiff_t offset; /* used while the stack is being reallocated */

0 commit comments

Comments
 (0)