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

Function luaD_hookcall

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

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

Callers 2

luaV_executeFunction · 0.85
luaG_tracecallFunction · 0.85

Calls 1

luaD_hookFunction · 0.85

Tested by

no test coverage detected