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

Function luaD_poscall

third-party/lua-5.5.0/src/ldo.c:605–615  ·  view source on GitHub ↗

** Finishes a function call: calls hook if necessary, moves current ** number of results to proper place, and returns to previous call ** info. If function has to close variables, hook must be called after ** that. */

Source from the content-addressed store, hash-verified

603** that.
604*/
605void luaD_poscall (lua_State *L, CallInfo *ci, int nres) {
606 l_uint32 fwanted = ci->callstatus & (CIST_TBC | CIST_NRESULTS);
607 if (l_unlikely(L->hookmask) && !(fwanted & CIST_TBC))
608 rethook(L, ci, nres);
609 /* move results to proper place */
610 moveresults(L, ci->func.p, nres, fwanted);
611 /* function cannot be in any of these cases when returning */
612 lua_assert(!(ci->callstatus &
613 (CIST_HOOKED | CIST_YPCALL | CIST_FIN | CIST_CLSRET)));
614 L->ci = ci->previous; /* back to caller (after closing variables) */
615}
616
617
618

Callers 4

luaV_executeFunction · 0.70
precallCFunction · 0.70
finishCcallFunction · 0.70
resumeFunction · 0.70

Calls 2

rethookFunction · 0.70
moveresultsFunction · 0.70

Tested by

no test coverage detected