lua-users home
lua-l archive

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

>> never made it public, and it sits unused in my project now.  It was working
>> fine, but in the end a system like that suffers the same issue as with using
>> floating point values to pass around C pointers in Lua-- it isn't exactly
>> safe.  For example on my project the Lua number type is 32-bit float, and
>> using that type to work with 32-bit pointers and integers is dubious.
>i had thoughts along the same lines... is there any way around this (not
>using userdata which - as i understand - actually is a void*)?

Userdata is the way to send C pointers to Lua (and back). It was designed from
the start for this use. Why try to avoid it?