MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / luaD_hookcall

Function luaD_hookcall

extlibs/lua/src/ldo.c:314–324  ·  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

312** active.
313*/
314void luaD_hookcall (lua_State *L, CallInfo *ci) {
315 int hook = (ci->callstatus & CIST_TAIL) ? LUA_HOOKTAILCALL : LUA_HOOKCALL;
316 Proto *p;
317 if (!(L->hookmask & LUA_MASKCALL)) /* some other hook? */
318 return; /* don't call hook */
319 p = clLvalue(s2v(ci->func))->p;
320 L->top = ci->top; /* prepare top */
321 ci->u.l.savedpc++; /* hooks assume 'pc' is already incremented */
322 luaD_hook(L, hook, -1, 1, p->numparams);
323 ci->u.l.savedpc--; /* correct 'pc' */
324}
325
326
327static StkId rethook (lua_State *L, CallInfo *ci, StkId firstres, int nres) {

Callers 1

luaV_executeFunction · 0.85

Calls 1

luaD_hookFunction · 0.85

Tested by

no test coverage detected