lua-users home
lua-l archive

Re: Suggestion: upvalues to C hook functions

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


> 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.

AltStyle によって変換されたページ (->オリジナル) /