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