lua-users home
lua-l archive

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

On 09.01.2011 23:49, Sam Roberts wrote:
Trying to guess what the "the problem" is, but for a module, you'd use
a lightuserdata of a pointer to something in your modules C
implementation, the module function, a static variable. C doesn't put
multiple things at the same pointer address, so it will be unique.

User application may use lightuserdata to store arbitrary values, like HWND handles or whatever it likes. If there was an agreement that only pointers to real data may be kept as keys in registry, just as there is an agreement on number keys, there would be no problem.

Best regards,
Sergey Rozhenko