[cffi-devel] Passing address of pointer
Frank Goenninger
frgo at me.com
Fri Aug 26 11:03:22 UTC 2011
Am 26.08.2011 um 12:52 schrieb Luís Oliveira:
> On Fri, Aug 26, 2011 at 10:08 AM, Frank Goenninger <frgo at me.com> wrote:
>> kr = (*privateDataRef->deviceInterface)->GetLocationID(privateDataRef->deviceInterface, &locationID);
>>
>> Here I need to pass the address of a pointer to IOUSBDeviceInterface struct ...
>
> Couldn't you call it like this?
>
> IOUSBDeviceInterface *foo;
> GetLocationID(&foo, ...);
>
> If you can, I'd try reducing your test case to allocate a pointer
> using WITH-FOREIGN-OBJECT and pass that to GetLocationID instead of
> using a struct.
>
> Cheers,
And how would the CFFI equivalent to
> GetLocationID(&foo, ...);
look like?
I still need the address of a variable that holds a pointer (and not the struct)...
(with-foreign-object (ptr :pointer)
...
?
Cheers
Frank
More information about the cffi-devel
mailing list