public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Haley <aph@redhat.com>
To: Hayden Livingston <halivingston@gmail.com>
Cc: libffi-discuss@sourceware.org
Subject: Re: does it matter how I construct an aggregate struct type if its size is the same?
Date: Fri, 18 Dec 2015 20:04:00 -0000	[thread overview]
Message-ID: <567466D0.5020305@redhat.com> (raw)
In-Reply-To: <CAMxMwyJq-FH9gwvtJ3-AOnHoDUfdY2Oj8E2pSeNpHj42Wdif0g@mail.gmail.com>

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.

  reply	other threads:[~2015-12-18 20:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-18  6:47 Hayden Livingston
2015-12-18  6:50 ` Hayden Livingston
2015-12-18 11:08 ` Andrew Haley
2015-12-18 15:16   ` Hayden Livingston
2015-12-18 20:04     ` Andrew Haley [this message]
2015-12-18 21:42       ` Jay
2015-12-18 22:16         ` Hayden Livingston
2015-12-18 22:24           ` Andrew Haley
2015-12-18 23:10             ` Hayden Livingston

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=567466D0.5020305@redhat.com \
    --to=aph@redhat.com \
    --cc=halivingston@gmail.com \
    --cc=libffi-discuss@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).