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

Function luaD_hookcall

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

374** active.
375*/
376void luaD_hookcall (lua_State *L, CallInfo *ci) {
377 L->oldpc = 0; /* set 'oldpc' for new function */
378 if (L->hookmask & LUA_MASKCALL) { /* is call hook on? */
379 int event = (ci->callstatus & CIST_TAIL) ? LUA_HOOKTAILCALL
380 : LUA_HOOKCALL;
381 Proto *p = ci_func(ci)->p;
382 ci->u.l.savedpc++; /* hooks assume 'pc' is already incremented */
383 luaD_hook(L, event, -1, 1, p->numparams);
384 ci->u.l.savedpc--; /* correct 'pc' */
385 }
386}
387
388
389/*

Callers 2

luaV_executeFunction · 0.70
luaG_tracecallFunction · 0.70

Calls 1

luaD_hookFunction · 0.70

Tested by

no test coverage detected