[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: hook question
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 11 Oct 2006 15:29:48 -0300
> 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