MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / lua_toclose

Function lua_toclose

extlibs/lua/src/lapi.c:1222–1235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1220
1221
1222LUA_API void lua_toclose (lua_State *L, int idx) {
1223 int nresults;
1224 StkId o;
1225 lua_lock(L);
1226 o = index2stack(L, idx);
1227 nresults = L->ci->nresults;
1228 api_check(L, L->openupval == NULL || uplevel(L->openupval) <= o,
1229 "marked index below or equal new one");
1230 luaF_newtbcupval(L, o); /* create new to-be-closed upvalue */
1231 if (!hastocloseCfunc(nresults)) /* function not marked yet? */
1232 L->ci->nresults = codeNresults(nresults); /* mark it */
1233 lua_assert(hastocloseCfunc(L->ci->nresults));
1234 lua_unlock(L);
1235}
1236
1237
1238LUA_API void lua_concat (lua_State *L, int n) {

Callers 1

prepbuffsizeFunction · 0.85

Calls 2

index2stackFunction · 0.85
luaF_newtbcupvalFunction · 0.85

Tested by

no test coverage detected