[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Suggestion: upvalues to C hook functions
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 18 Apr 2007 10:04:06 -0300
> The current API does not allow giving upvalues to the hook function
> from C API. This would be required in multithreading scenarios where
> several Lua states may be using the same lua_Hook function.
What you want is a closure not upvalues. Hook functions are not Lua
functions and so cannot have upvalues. So a better and equivalent API
would be to sethook to receive a void* just like reader functions.