This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
Re: [Question]pass structure by reference
- From: Anthony Green <green at redhat dot com>
- To: ivo f <ivo dot fried at gmx dot net>
- Cc: libffi-discuss at sourceware dot org
- Date: Fri, 04 Feb 2011 11:22:17 -0500
- Subject: Re: [Question]pass structure by reference
- References: <30842627.post@talk.nabble.com>
ivo f <ivo.fried@gmx.net> writes:
> Hello,
>
> I hope this question isn't too noobish, but I'm kind of stuck with libffi. I
> was trying around passing structures with libffi, which works perfectly
> well, but I couldn't figure out if and especially how I can pass pointers to
> structures. The only way i see to pass a pointer is to use the
> FFI_TYPE_POINTER definition which specifies exactly one argument. The
> structure definition allows me to wrap any number of arguments into a
> structure and pass them as such, but is there a way to combine both? So to
> pass a structure using libffi by reference?
libffi doesn't distinguish between different pointer types, since none
of the supported ABIs require this. They are all just pointers.
AG
>
> Thanks in advance for your help!