How to call 'printf' using libffi?

Andrew Haley aph@redhat.com
Mon Mar 22 10:36:48 GMT 2021


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



More information about the Libffi-discuss mailing list