lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>      typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar, void *userdata);
> 
>      void lua_sethook (lua_State *L, lua_Hook func, void *userdata, int mask, int count);

There is no need to change lua_Hook: you can add a userdata field to "ar".
Only lua_sethook has to be changed. And this can be done in a compatible
way with

#ifdef SETHOOK_COMPAT
#define lua_sethook(L,f,m,c) (lua_sethook)(L,f,NULL,m,c)
#endif

--lhf