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

Function lua_toclose

xrepo/packages/l/lua/port/lua/src/lapi.c:1273–1285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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