diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-05-21 17:38:46 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-05-21 17:38:46 -0700 |
commit | b5492b47b04e4c3bc4c175484744e76332a69a8d (patch) | |
tree | 64277663993694d448b5477267031b7962b1968f | |
parent | f4fbc27f443b1a33148f88cc1643e0a5aa48671b (diff) | |
download | txr-b5492b47b04e4c3bc4c175484744e76332a69a8d.tar.gz txr-b5492b47b04e4c3bc4c175484744e76332a69a8d.tar.bz2 txr-b5492b47b04e4c3bc4c175484744e76332a69a8d.zip |
ffi: floating-point endian types: wrong Lisp type.
* ffi.c (ffi_init_types): The be-float, be-double, le-float and
le-double types wrongly have integer indicated as their Lisp
type symbol; it should be float. This doesn't fix any actual bug;
the Lisp type is only important for structures/unions. The
conversion of be-double is driven by the behavior of the type's
virtual functions, which don't look at the Lisp type symbol.
-rw-r--r-- | ffi.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -4714,14 +4714,14 @@ static void ffi_init_types(void) ffi_be_i64_get, 0, 0)); #endif - ffi_typedef(be_float_s, make_ffi_type_builtin(be_float_s, integer_s, + ffi_typedef(be_float_s, make_ffi_type_builtin(be_float_s, float_s, FFI_KIND_NUM, sizeof (float), alignof (float), &ffi_type_float, ffi_be_float_put, ffi_be_float_get, 0, 0)); - ffi_typedef(be_double_s, make_ffi_type_builtin(be_double_s, integer_s, + ffi_typedef(be_double_s, make_ffi_type_builtin(be_double_s, float_s, FFI_KIND_NUM, sizeof (double), alignof (double), @@ -4788,14 +4788,14 @@ static void ffi_init_types(void) ffi_le_i64_get, 0, 0)); #endif - ffi_typedef(le_float_s, make_ffi_type_builtin(le_float_s, integer_s, + ffi_typedef(le_float_s, make_ffi_type_builtin(le_float_s, float_s, FFI_KIND_NUM, sizeof (float), alignof (float), &ffi_type_float, ffi_le_float_put, ffi_le_float_get, 0, 0)); - ffi_typedef(le_double_s, make_ffi_type_builtin(le_double_s, integer_s, + ffi_typedef(le_double_s, make_ffi_type_builtin(le_double_s, float_s, FFI_KIND_NUM, sizeof (double), alignof (double), |