Skip to content

Commit f9fa44b

Browse files
committed
lib: fix FLOAT_32 and FLOAT_64 type constants in ffi
1 parent d44a71a commit f9fa44b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/ffi/types.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,9 @@ 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" || type_str == "float32") {
250250
return Just(&ffi_type_float);
251-
} else if (type_str == "f64" || type_str == "double") {
251+
} else if (type_str == "f64" || type_str == "double" || type_str == "float64") {
252252
return Just(&ffi_type_double);
253253
} else if (type_str == "buffer" || type_str == "arraybuffer" ||
254254
type_str == "string" || type_str == "str" ||

0 commit comments

Comments
 (0)