[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: luajit FFI cdata problem
- From: Daurnimator <quae@...>
- Date: Thu, 31 Mar 2011 03:48:54 +1100
On 30 March 2011 21:50, Mike Pall <mikelu-1103@mike.de> wrote:
> 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.
>
> That's deliberate. cdata are unsuitable as table keys.
>
>> Anyone got some tricks to work with cdata?
>
> Read the docs: http://luajit.org/ext_ffi_semantics.html#cdata_key
>
> --Mike
>
Those docs still don't explain why they have an identity crisis...
assert (a==a) -- Blows up