Skip to content

Commit

Permalink
interp/wasman: add the other wasm types as valid param types for call…
Browse files Browse the repository at this point in the history
…ing instance

Signed-off-by: deadprogram <[email protected]>
  • Loading branch information
deadprogram committed Feb 28, 2024
1 parent 05bc406 commit f286aa5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions interp/wasman/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,22 @@ func (i *Instance) Call(name string, args ...interface{}) (interface{}, error) {
for i, v := range args {
wargs[i] = uint64(v.(uint32))
}
case int64:
for i, v := range args {
wargs[i] = uint64(v.(int64))
}
case uint64:
for i, v := range args {
wargs[i] = uint64(v.(uint64))
}
case float32:
for i, v := range args {
wargs[i] = uint64(v.(float32))
}
case float64:
for i, v := range args {
wargs[i] = uint64(v.(float64))
}
}
results, _, err := i.instance.CallExportedFunc(name, wargs...)
if err != nil {
Expand Down

0 comments on commit f286aa5

Please sign in to comment.