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

Function luaF_close

lib/lua/src/lfunc.c:227–237  ·  view source on GitHub ↗

** Close all upvalues and to-be-closed variables up to the given stack ** level. Return restored 'level'. */

Source from the content-addressed store, hash-verified

225** level. Return restored 'level'.
226*/
227StkId luaF_close (lua_State *L, StkId level, int status, int yy) {
228 ptrdiff_t levelrel = savestack(L, level);
229 luaF_closeupval(L, level); /* first, close the upvalues */
230 while (L->tbclist.p >= level) { /* traverse tbc's down to that level */
231 StkId tbc = L->tbclist.p; /* get variable index */
232 poptbclist(L); /* remove it from list */
233 prepcallclosemth(L, tbc, status, yy); /* close variable */
234 level = restorestack(L, levelrel);
235 }
236 return level;
237}
238
239
240Proto *luaF_newproto (lua_State *L) {

Callers 6

luaV_executeFunction · 0.85
moveresultsFunction · 0.85
finishpcallkFunction · 0.85
closepauxFunction · 0.85
lua_settopFunction · 0.85
lua_closeslotFunction · 0.85

Calls 3

luaF_closeupvalFunction · 0.85
poptbclistFunction · 0.85
prepcallclosemthFunction · 0.85

Tested by

no test coverage detected