This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Question]pass structure by reference


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!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]