summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2022-11-08 10:15:10 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2022-11-08 10:15:10 -0300
commitbe908a7d4d8130264ad67c5789169769f824c5d1 (patch)
tree3601b5fe16b27045d0604fb27e4cc5c5ece6883c
parent9ede317c70ad82279f2e3962eb52904a17bf4b55 (diff)
downloadlua-github-be908a7d4d8130264ad67c5789169769f824c5d1.tar.gz
Removed unused field 'UpVal.tbc'
-rw-r--r--lfunc.c5
-rw-r--r--lobject.h1
2 files changed, 2 insertions, 4 deletions
diff --git a/lfunc.c b/lfunc.c
index 804bf9dc..0945f241 100644
--- a/lfunc.c
+++ b/lfunc.c
@@ -62,12 +62,11 @@ void luaF_initupvals (lua_State *L, LClosure *cl) {
** Create a new upvalue at the given level, and link it to the list of
** open upvalues of 'L' after entry 'prev'.
**/
-static UpVal *newupval (lua_State *L, int tbc, StkId level, UpVal **prev) {
+static UpVal *newupval (lua_State *L, StkId level, UpVal **prev) {
GCObject *o = luaC_newobj(L, LUA_VUPVAL, sizeof(UpVal));
UpVal *uv = gco2upv(o);
UpVal *next = *prev;
uv->v.p = s2v(level); /* current value lives in the stack */
- uv->tbc = tbc;
uv->u.open.next = next; /* link it to list of open upvalues */
uv->u.open.previous = prev;
if (next)
@@ -96,7 +95,7 @@ UpVal *luaF_findupval (lua_State *L, StkId level) {
pp = &p->u.open.next;
}
/* not found: create a new upvalue after 'pp' */
- return newupval(L, 0, level, pp);
+ return newupval(L, level, pp);
}
diff --git a/lobject.h b/lobject.h
index e7f58cbd..556608e4 100644
--- a/lobject.h
+++ b/lobject.h
@@ -628,7 +628,6 @@ typedef struct Proto {
*/
typedef struct UpVal {
CommonHeader;
- lu_byte tbc; /* true if it represents a to-be-closed variable */
union {
TValue *p; /* points to stack or to its own value */
ptrdiff_t offset; /* used while the stack is being reallocated */