does it matter how I construct an aggregate struct type if its size is the same?
Jay
jay.krell@cornell.edu
Fri Dec 18 21:42:00 GMT 2015
Still beware of alignment.
- Jay
On Dec 18, 2015, at 12:04 PM, Andrew Haley <aph@redhat.com> wrote:
> On 18/12/15 15:16, Hayden Livingston wrote:
>> Thanks, Andrew. Where is this exception? In ABIs?
>>
>> So you're suggesting I use char's to construct my ffi_types?
>
> Well, it can be awkward. Some targets pass the components of a
> struct in registers. But this only matters if you pass a struct
> by value, which is a fairly unusual thing to do in C. If you're
> passing a struct by reference, then yes, you can just create a
> char array of the right size.
>
> Andrew.
>
More information about the Libffi-discuss
mailing list