MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / lua_toclose

Function lua_toclose

lib/lua/src/lapi.c:1270–1282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1268
1269
1270LUA_API void lua_toclose (lua_State *L, int idx) {
1271 int nresults;
1272 StkId o;
1273 lua_lock(L);
1274 o = index2stack(L, idx);
1275 nresults = L->ci->nresults;
1276 api_check(L, L->tbclist.p < o, "given index below or equal a marked one");
1277 luaF_newtbcupval(L, o); /* create new to-be-closed upvalue */
1278 if (!hastocloseCfunc(nresults)) /* function not marked yet? */
1279 L->ci->nresults = codeNresults(nresults); /* mark it */
1280 lua_assert(hastocloseCfunc(L->ci->nresults));
1281 lua_unlock(L);
1282}
1283
1284
1285LUA_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