** Executes a call hook for Lua functions. This function is called ** whenever 'hookmask' is not zero, so it checks whether call hooks are ** active. */
| 374 | ** active. |
| 375 | */ |
| 376 | void 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 | /* |
no test coverage detected