[cffi-devel] strange behaviour of CFFI with LW on OS X

Antoine Allombert antoine.allombert at labri.fr
Wed Jun 25 15:42:46 UTC 2008


Luís Oliveira a écrit :
> On Wed, Jun 25, 2008 at 4:21 PM, Antoine Allombert
> <antoine.allombert at labri.fr> wrote:
>   
>>> You've allocated 2 bytes and then referenced 2 ints (8 bytes
>>> probably). Try (with-foreign-object (ptr :int 2) ...).
>>>       
> [...]
>   
>> It gives the same result.
>>     
>
> Right, while that was a problem with your code, it's not the main
> problem: MEM-REF's offset is measured in bytes. You want to use
> MEM-AREF instead.
>
>   
Right, it works.
Thanks !



More information about the cffi-devel mailing list