public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Haley <aph@redhat.com>
To: Anthony Green <green@moxielogic.com>
Cc: libffi-discuss <libffi-discuss@sourceware.org>
Subject: Re: How to call 'printf' using libffi?
Date: Mon, 22 Mar 2021 10:36:48 +0000	[thread overview]
Message-ID: <7f64d879-4b29-1d27-47c6-a942f1a35388@redhat.com> (raw)
In-Reply-To: <CACxje59Ost3P-zm5HequWmxi9UNXmavLgV5Ru+JcVuZPVDY5SQ@mail.gmail.com>

On 3/20/21 11:56 PM, Anthony Green wrote:
> It's worth noting that JNA, one of libffi's big users, does the
> float-to-double promotion at their layer.
> https://github.com/java-native-access/jna/issues/463
> 
> Ruby's FFI does the same thing:
> https://github.com/ffi/ffi/blob/6d14c0a9107c0d5febb3bf92a60d2581e768fa2f/ext/ffi_c/Variadic.c
> 
> This is making me feel more comfortable about returning an error on float
> varargs.  (I've change my mind about aborting)
That souns right. libffi is the lowest-level layer, after all.

-- 
Andrew Haley  (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671


  reply	other threads:[~2021-03-22 10:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-18 14:04 ShaJunxing
2021-03-18 15:25 ` Anthony Green
2021-03-19  2:08   ` ShaJunxing
2021-03-19  2:36     ` Kaz Kylheku (libffi)
2021-03-19  3:09       ` ShaJunxing
2021-03-19 10:13   ` Andrew Haley
2021-03-19 11:01     ` Anthony Green
2021-03-19 11:43       ` Andrew Haley
2021-03-20 22:40         ` Anthony Green
2021-03-20 23:56           ` Anthony Green
2021-03-22 10:36             ` Andrew Haley [this message]
2021-03-19 11:26     ` Jarkko Hietaniemi
2021-03-19 11:33       ` Anthony Green

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=7f64d879-4b29-1d27-47c6-a942f1a35388@redhat.com \
    --to=aph@redhat.com \
    --cc=green@moxielogic.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).