MCPcopy Create free account
hub / github.com/DFHack/dfhack / callhook

Function callhook

depends/lua/src/ldo.c:280–290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278
279
280static void callhook (lua_State *L, CallInfo *ci) {
281 int hook = LUA_HOOKCALL;
282 ci->u.l.savedpc++; /* hooks assume 'pc' is already incremented */
283 if (isLua(ci->previous) &&
284 GET_OPCODE(*(ci->previous->u.l.savedpc - 1)) == OP_TAILCALL) {
285 ci->callstatus |= CIST_TAIL;
286 hook = LUA_HOOKTAILCALL;
287 }
288 luaD_hook(L, hook, -1);
289 ci->u.l.savedpc--; /* correct 'pc' */
290}
291
292
293static StkId adjust_varargs (lua_State *L, Proto *p, int actual) {

Callers 1

luaD_precallFunction · 0.85

Calls 1

luaD_hookFunction · 0.85

Tested by

no test coverage detected