MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / prepcallclosemth

Function prepcallclosemth

third-party/lua-5.4.6/src/lfunc.c:143–153  ·  view source on GitHub ↗

** Prepare and call a closing method. ** If status is CLOSEKTOP, the call to the closing method will be pushed ** at the top of the stack. Otherwise, values can be pushed right after ** the 'level' of the upvalue being closed, as everything after that ** won't be used again. */

Source from the content-addressed store, hash-verified

141** won't be used again.
142*/
143static void prepcallclosemth (lua_State *L, StkId level, int status, int yy) {
144 TValue *uv = s2v(level); /* value being closed */
145 TValue *errobj;
146 if (status == CLOSEKTOP)
147 errobj = &G(L)->nilvalue; /* error object is nil */
148 else { /* 'luaD_seterrorobj' will set top to level + 2 */
149 errobj = s2v(level + 1); /* error object goes after 'uv' */
150 luaD_seterrorobj(L, status, level + 1); /* set error object */
151 }
152 callclosemethod(L, uv, errobj, yy);
153}
154
155
156/*

Callers 1

luaF_closeFunction · 0.70

Calls 2

luaD_seterrorobjFunction · 0.70
callclosemethodFunction · 0.70

Tested by

no test coverage detected