public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@redhat.com>
To: Tom Tromey <tom@tromey.com>
Cc: libffi-discuss <libffi-discuss@sourceware.org>
Subject: Re: documentation patch, oddities, and proposals
Date: Mon, 09 Nov 2015 07:39:00 -0000	[thread overview]
Message-ID: <56404DB8.9040309@redhat.com> (raw)
In-Reply-To: <87wpttd47v.fsf@tromey.com>

On 11/07/2015 08:00 PM, Tom Tromey wrote:
> rth> Indeed.  It would be very nice to require a separate layout call,
> rth> rather than imply it from ffi_prep_cif.  This would also nicely fix
> rth> the problem that libgo encountered wrt zero-sized structures.
>
> What was that problem btw?  If it's something users might encounter I
> could update the docs to account for it.

The fact that size 0 is the trigger that the structure hasn't been layed out. 
So every call to such a function re-enters the layout for a zero-sized struct.
In the end it still works, but there's more overhead than needed.


r~

  reply	other threads:[~2015-11-09  7:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-04  5:32 Tom Tromey
2015-11-04  5:35 ` Andrew Pinski
2015-11-04  7:31 ` Richard Henderson
2015-11-04 14:20   ` Tom Tromey
2015-11-04 14:24     ` Richard Henderson
2015-11-07 19:01   ` Tom Tromey
2015-11-09  7:39     ` Richard Henderson [this message]
2015-11-10 23:36   ` Tom Tromey
2015-11-16  4:27     ` Tom Tromey
2015-11-17  9:09       ` Richard Henderson

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=56404DB8.9040309@redhat.com \
    --to=rth@redhat.com \
    --cc=libffi-discuss@sourceware.org \
    --cc=tom@tromey.com \
    /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).