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

Function luaD_poscall

third-party/lua-5.4.6/src/ldo.c:492–502  ·  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

490** that.
491*/
492void luaD_poscall (lua_State *L, CallInfo *ci, int nres) {
493 int wanted = ci->nresults;
494 if (l_unlikely(L->hookmask && !hastocloseCfunc(wanted)))
495 rethook(L, ci, nres);
496 /* move results to proper place */
497 moveresults(L, ci->func.p, nres, wanted);
498 /* function cannot be in any of these cases when returning */
499 lua_assert(!(ci->callstatus &
500 (CIST_HOOKED | CIST_YPCALL | CIST_FIN | CIST_TRAN | CIST_CLSRET)));
501 L->ci = ci->previous; /* back to caller (after closing variables) */
502}
503
504
505

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