** Executes a call hook for Lua functions. This function is called ** whenever 'hookmask' is not zero, so it checks whether call hooks are ** active. */
| 474 | ** active. |
| 475 | */ |
| 476 | void luaD_hookcall (lua_State *L, CallInfo *ci) { |
| 477 | L->oldpc = 0; /* set 'oldpc' for new function */ |
| 478 | if (L->hookmask & LUA_MASKCALL) { /* is call hook on? */ |
| 479 | int event = (ci->callstatus & CIST_TAIL) ? LUA_HOOKTAILCALL |
| 480 | : LUA_HOOKCALL; |
| 481 | Proto *p = ci_func(ci)->p; |
| 482 | ci->u.l.savedpc++; /* hooks assume 'pc' is already incremented */ |
| 483 | luaD_hook(L, event, -1, 1, p->numparams); |
| 484 | ci->u.l.savedpc--; /* correct 'pc' */ |
| 485 | } |
| 486 | } |
| 487 | |
| 488 | |
| 489 | /* |
no test coverage detected