summaryrefslogtreecommitdiffstats
path: root/ffi.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-05-21 17:38:46 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-05-21 17:38:46 -0700
commit128261df50be4d7f73ffe18b53388bc2e9cced65 (patch)
tree64277663993694d448b5477267031b7962b1968f /ffi.c
parent7a2c2e84dd0d520fb08402895b4f7cd8c139a81b (diff)
downloadtxr-128261df50be4d7f73ffe18b53388bc2e9cced65.tar.gz
txr-128261df50be4d7f73ffe18b53388bc2e9cced65.tar.bz2
txr-128261df50be4d7f73ffe18b53388bc2e9cced65.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.
Diffstat (limited to 'ffi.c')
-rw-r--r--ffi.c8
1 files 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),