** Insert a variable in the list of to-be-closed variables. */
| 167 | ** Insert a variable in the list of to-be-closed variables. |
| 168 | */ |
| 169 | void luaF_newtbcupval (lua_State *L, StkId level) { |
| 170 | lua_assert(level > L->tbclist); |
| 171 | if (l_isfalse(s2v(level))) |
| 172 | return; /* false doesn't need to be closed */ |
| 173 | checkclosemth(L, level); /* value must have a close method */ |
| 174 | while (cast_uint(level - L->tbclist) > MAXDELTA) { |
| 175 | L->tbclist += MAXDELTA; /* create a dummy node at maximum delta */ |
| 176 | L->tbclist->tbclist.delta = 0; |
| 177 | } |
| 178 | level->tbclist.delta = cast(unsigned short, level - L->tbclist); |
| 179 | L->tbclist = level; |
| 180 | } |
| 181 | |
| 182 | |
| 183 | void luaF_unlinkupval (UpVal *uv) { |
no test coverage detected