/* Close all upvalues and to-be-closed variables up to the given stack level.  */
void luaF_close(lua_State *L, StkId level, int status, int yy)
/* Close all upvalues and to-be-closed variables up to the given stack level.  */
void luaF_close(lua_State *L, StkId level, int status, int yy)
{
    StkId tbc = L->tbclist;
    poptbclist(L);
    prepcallclosemth(L, tbc, status, yy);
    level = restorestack(L, levelrel);
  }
}