static void callf (lua_Function func, char *file, int line) { if (func != LUA_NOOBJECT) { lua_pushobject(func); lua_pushstring(file); lua_pushnumber(line); } dohook(callhook); }
void luaD_lineHook (lua_State *L, StkId func, int line, lua_Hook linehook) { if (L->allowhooks) { lua_Debug ar; ar._func = func; ar.event = "line"; ar.currentline = line; dohook(L, &ar, linehook); } }
static void luaD_callHook (lua_State *L, StkId func, lua_Hook callhook, const char *event) { if (L->allowhooks) { lua_Debug ar; ar._func = func; ar.event = event; infovalue(func)->pc = NULL; /* function is not active */ dohook(L, &ar, callhook); } }
static void linef (int line) { lua_pushnumber(line); dohook(linehook); }