lua-users home
lua-l archive

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

On Wednesday 30, Daurnimator wrote:
> Cdata returned from C structures is not the same each time it is
> fetched... This is creating problems with using cdata as keys in
> tables.
> (see attached)
> also, cdata does not even compare equal (that is, assert(a==a) fails)
> Anyone got some tricks to work with cdata?

for pointers I do:
local obj_key = tonumber(ffi.cast('uintptr_t', obj))

Robert G. Jakabosky