Skip to content

Commit 10ae641

Browse files
committed
lib: fix FLOAT_32 and FLOAT_64 type constants in ffi
PR-URL: #62892 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Bryan English <[email protected]>
1 parent ce21c87 commit 10ae641

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/ffi/types.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,11 @@ v8::Maybe<ffi_type*> ToFFIType(Environment* env, std::string_view type_str) {
246246
return Just(&ffi_type_sint64);
247247
} else if (type_str == "u64" || type_str == "uint64") {
248248
return Just(&ffi_type_uint64);
249-
} else if (type_str == "f32" || type_str == "float") {
249+
} else if (type_str == "f32" || type_str == "float" ||
250+
type_str == "float32") {
250251
return Just(&ffi_type_float);
251-
} else if (type_str == "f64" || type_str == "double") {
252+
} else if (type_str == "f64" || type_str == "double" ||
253+
type_str == "float64") {
252254
return Just(&ffi_type_double);
253255
} else if (type_str == "buffer" || type_str == "arraybuffer" ||
254256
type_str == "string" || type_str == "str" ||

0 commit comments

Comments
 (0)