From b5492b47b04e4c3bc4c175484744e76332a69a8d Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 21 May 2022 17:38:46 -0700 Subject: 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. --- ffi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ffi.c b/ffi.c index 404af578..c8b7c62d 100644 --- a/ffi.c +++ b/ffi.c @@ -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), -- cgit v1.2.3