MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / callhook

Function callhook

libraries/AP_Scripting/lua/src/ldo.c:289–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

287
288
289static void callhook (lua_State *L, CallInfo *ci) {
290 int hook = LUA_HOOKCALL;
291 ci->u.l.savedpc++; /* hooks assume 'pc' is already incremented */
292 if (isLua(ci->previous) &&
293 GET_OPCODE(*(ci->previous->u.l.savedpc - 1)) == OP_TAILCALL) {
294 ci->callstatus |= CIST_TAIL;
295 hook = LUA_HOOKTAILCALL;
296 }
297 luaD_hook(L, hook, -1);
298 ci->u.l.savedpc--; /* correct 'pc' */
299}
300
301
302static 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