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