Correcting python GCD example (#5324)

This commit is contained in:
Dan King
2022-11-27 20:18:03 -05:00
committed by GitHub
parent 28cf995fd3
commit 0d27c48221

View File

@@ -58,10 +58,10 @@ API](https://bytecodealliance.github.io/wasmtime-py/):
from wasmtime import Store, Module, Instance
store = Store()
module = Module.from_file(store, 'gcd.wat')
instance = Instance(module, [])
gcd = instance.get_export('gcd')
print("gcd(27, 6) =", gcd(27, 6))
module = Module.from_file(store.engine, 'gcd.wat')
instance = Instance(store, module, [])
gcd = instance.exports(store)['gcd']
print("gcd(27, 6) = %d" % gcd(store, 27, 6))
```
## More examples and contributing