[cffi-devel] Passing address of pointer
Martin Simmons
martin at lispworks.com
Fri Aug 26 11:13:47 UTC 2011
>>>>> On Thu, 25 Aug 2011 19:19:41 +0200, Frank Goenninger said:
>
> (setq res (foreign-funcall-pointer
> query-interface-ptr
> ()
> :pointer plugInInterface
> CFUUIDBytes (cf-uuid-get-uuid-bytes
> kIOUSBDeviceInterfaceID)
> :pointer (foreign-slot-pointer privateDataRef
> 'MyPrivateData
> 'deviceInterface)))
> ...
>
> This code "crashes" with signal 100 as reported by AllegroCL in the call to foreign-funcall-pointer ...
I suspect the problem is the UUID argument, not the pointer.
CFUUIDBytes is a struct type, i.e. you need to pass the aggregate by value.
IIRC, CFFI doesn't support that.
__Martin
More information about the cffi-devel
mailing list