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

Function luaD_hookcall

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

345** active.
346*/
347void luaD_hookcall (lua_State *L, CallInfo *ci) {
348 L->oldpc = 0; /* set 'oldpc' for new function */
349 if (L->hookmask & LUA_MASKCALL) { /* is call hook on? */
350 int event = (ci->callstatus & CIST_TAIL) ? LUA_HOOKTAILCALL
351 : LUA_HOOKCALL;
352 Proto *p = ci_func(ci)->p;
353 ci->u.l.savedpc++; /* hooks assume 'pc' is already incremented */
354 luaD_hook(L, event, -1, 1, p->numparams);
355 ci->u.l.savedpc--; /* correct 'pc' */
356 }
357}
358
359
360/*

Callers 1

luaV_executeFunction · 0.85

Calls 1

luaD_hookFunction · 0.85

Tested by

no test coverage detected