2
0
Эх сурвалжийг харах

Removed unused field 'UpVal.tbc'

Roberto Ierusalimschy 2 жил өмнө
parent
commit
be908a7d4d
2 өөрчлөгдсөн 2 нэмэгдсэн , 4 устгасан
  1. 2 3
      lfunc.c
  2. 0 1
      lobject.h

+ 2 - 3
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
 ** Create a new upvalue at the given level, and link it to the list of
 ** open upvalues of 'L' after entry 'prev'.
 ** 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));
   GCObject *o = luaC_newobj(L, LUA_VUPVAL, sizeof(UpVal));
   UpVal *uv = gco2upv(o);
   UpVal *uv = gco2upv(o);
   UpVal *next = *prev;
   UpVal *next = *prev;
   uv->v.p = s2v(level);  /* current value lives in the stack */
   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.next = next;  /* link it to list of open upvalues */
   uv->u.open.previous = prev;
   uv->u.open.previous = prev;
   if (next)
   if (next)
@@ -96,7 +95,7 @@ UpVal *luaF_findupval (lua_State *L, StkId level) {
     pp = &p->u.open.next;
     pp = &p->u.open.next;
   }
   }
   /* not found: create a new upvalue after 'pp' */
   /* not found: create a new upvalue after 'pp' */
-  return newupval(L, 0, level, pp);
+  return newupval(L, level, pp);
 }
 }
 
 
 
 

+ 0 - 1
lobject.h

@@ -628,7 +628,6 @@ typedef struct Proto {
 */
 */
 typedef struct UpVal {
 typedef struct UpVal {
   CommonHeader;
   CommonHeader;
-  lu_byte tbc;  /* true if it represents a to-be-closed variable */
   union {
   union {
     TValue *p;  /* points to stack or to its own value */
     TValue *p;  /* points to stack or to its own value */
     ptrdiff_t offset;  /* used while the stack is being reallocated */
     ptrdiff_t offset;  /* used while the stack is being reallocated */