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

Function luaD_poscall

xrepo/packages/l/lua/port/lua/src/ldo.c:462–472  ·  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

460** that.
461*/
462void luaD_poscall (lua_State *L, CallInfo *ci, int nres) {
463 int wanted = ci->nresults;
464 if (l_unlikely(L->hookmask && !hastocloseCfunc(wanted)))
465 rethook(L, ci, nres);
466 /* move results to proper place */
467 moveresults(L, ci->func, nres, wanted);
468 /* function cannot be in any of these cases when returning */
469 lua_assert(!(ci->callstatus &
470 (CIST_HOOKED | CIST_YPCALL | CIST_FIN | CIST_TRAN | CIST_CLSRET)));
471 L->ci = ci->previous; /* back to caller (after closing variables) */
472}
473
474
475

Callers 4

luaV_executeFunction · 0.85
precallCFunction · 0.85
finishCcallFunction · 0.85
resumeFunction · 0.85

Calls 2

rethookFunction · 0.85
moveresultsFunction · 0.85

Tested by

no test coverage detected