mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
up
This commit is contained in:
parent
9f01810981
commit
a37ee9d556
@ -1,3 +1,8 @@
|
||||
## 0.8.1
|
||||
|
||||
+ Bug fix
|
||||
+ Add `vm.bind<T>` support
|
||||
|
||||
## 0.8.0+2
|
||||
|
||||
+ add complete reflection (exec/eval/getattr/setattr/hasattr)
|
||||
|
@ -123,6 +123,10 @@ vm.exec(code);
|
||||
var _o = vm.read_output();
|
||||
print(_o.stdout) // "Hello world!\n"
|
||||
print(_o.stderr) // ""
|
||||
|
||||
// Create a binding
|
||||
vm.bind<int>("builtins", "add", (int x, int y) => x + y);
|
||||
vm.eval("add(1, 2)"); // '3'
|
||||
```
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user