MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / luaD_poscall

Function luaD_poscall

3rd/lua-5.4.3/src/ldo.c:459–469  ·  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

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

Callers 4

luaV_executeFunction · 0.85
luaD_precallFunction · 0.85
finishCcallFunction · 0.85
resumeFunction · 0.85

Calls 2

rethookFunction · 0.85
moveresultsFunction · 0.85

Tested by

no test coverage detected