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

Function luaD_hookcall

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

** Executes a call hook for Lua functions. This function is called ** whenever 'hookmask' is not zero, so it checks whether call hooks are ** active. */

Source from the content-addressed store, hash-verified

474** active.
475*/
476void luaD_hookcall (lua_State *L, CallInfo *ci) {
477 L->oldpc = 0; /* set 'oldpc' for new function */
478 if (L->hookmask & LUA_MASKCALL) { /* is call hook on? */
479 int event = (ci->callstatus & CIST_TAIL) ? LUA_HOOKTAILCALL
480 : LUA_HOOKCALL;
481 Proto *p = ci_func(ci)->p;
482 ci->u.l.savedpc++; /* hooks assume 'pc' is already incremented */
483 luaD_hook(L, event, -1, 1, p->numparams);
484 ci->u.l.savedpc--; /* correct 'pc' */
485 }
486}
487
488
489/*

Callers 2

luaV_executeFunction · 0.70
luaG_tracecallFunction · 0.70

Calls 1

luaD_hookFunction · 0.70

Tested by

no test coverage detected