Skip to content

Commit dc3d697

Browse files
FIXES #137: make calling wasm from python 7x faster
1 parent 383cad6 commit dc3d697

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

wasmtime/_func.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ def val_setter(dst, attr, val):
8282
# TODO: validate same val._func.store_id
8383
casted = val._func.index
8484
else:
85-
casted = val
85+
if isinstance(val, Val):
86+
casted = getattr(val._raw.of, attr)
87+
else:
88+
casted = val
8689
setattr(dst, attr, casted)
8790

8891
class Func:

0 commit comments

Comments
 (0)