MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / lua_toclose

Function lua_toclose

3rd/lua-5.4.3/src/lapi.c:1262–1274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1260
1261
1262LUA_API void lua_toclose (lua_State *L, int idx) {
1263 int nresults;
1264 StkId o;
1265 lua_lock(L);
1266 o = index2stack(L, idx);
1267 nresults = L->ci->nresults;
1268 api_check(L, L->tbclist < o, "given index below or equal a marked one");
1269 luaF_newtbcupval(L, o); /* create new to-be-closed upvalue */
1270 if (!hastocloseCfunc(nresults)) /* function not marked yet? */
1271 L->ci->nresults = codeNresults(nresults); /* mark it */
1272 lua_assert(hastocloseCfunc(L->ci->nresults));
1273 lua_unlock(L);
1274}
1275
1276
1277LUA_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