[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: hook question
- From: roberto@... (Roberto Ierusalimschy)
- Date: Wed, 11 Oct 2006 10:58:21 -0300
> >I do have one further question for Mike. What do you
> >think of the idea of a prototype for lua_sethook() that reads
> >like:
> >
> >typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar, void*
> >userdata);
>
> I don't know what Mike thinks, but I think it's a good idea.
>
> When I'm creating interfaces in C I almost always regret creating an
> interface where I pass a C function pointer but not an associated
> void * data closure as well.
Please remember that hooks already have the whole Lua state as a
"closure". The point here is only performance.
Setting a hook already has a big impact on performance. Does it make a
significant difference an extra access to the registry inside the hook?
-- Roberto
- References:
- hook question, David Burgess
- Re: hook question, Lavergne Thomas
- Re: hook question, David Burgess
- Re: hook question, Mike Pall
- Re: hook question, David Jones
- Re: hook question, Mike Pall
- Re: hook question, David Jones
- Re: hook question, Mike Pall
- Re: hook question, David Burgess
- Re: hook question, David Jones