MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / luaD_poscall

Function luaD_poscall

lib/lua/src/ldo.c:485–495  ·  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

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

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