Skip to content

Commit 87e4f14

Browse files
committed
Add float converter for wasmtime with c-api
Signed-off-by: Matt Leon <mattleon@google.com>
1 parent bf28c18 commit 87e4f14

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/wasmtime/wasmtime.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,7 @@ template <> int64_t convertValueTypeToArg<int64_t>(wasm_val_t val) { return val.
476476
template <> uint64_t convertValueTypeToArg<uint64_t>(wasm_val_t val) {
477477
return static_cast<uint64_t>(val.of.i64);
478478
}
479+
template <> float convertValueTypeToArg<float>(wasm_val_t val) { return val.of.f32; }
479480
template <> double convertValueTypeToArg<double>(wasm_val_t val) { return val.of.f64; }
480481

481482
template <typename T, typename U, std::size_t... I>

0 commit comments

Comments
 (0)