mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
Update 1_5_0.md
This commit is contained in:
parent
7828ad2eec
commit
7aef0a3d5a
@ -93,6 +93,7 @@ For example:
|
|||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
vm->bind__next__(type, [](VM* vm, PyObject* _0){
|
vm->bind__next__(type, [](VM* vm, PyObject* _0){
|
||||||
|
if(is_end) return vm->StopIteration;
|
||||||
// ...
|
// ...
|
||||||
PyObject* a = VAR(1);
|
PyObject* a = VAR(1);
|
||||||
PyObject* b = VAR(2);
|
PyObject* b = VAR(2);
|
||||||
@ -111,6 +112,7 @@ In `v1.5.0`, you need to use stack-based style to reimplement the above code:
|
|||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
vm->bind__next__(type, [](VM* vm, PyObject* _0) -> unsigned{
|
vm->bind__next__(type, [](VM* vm, PyObject* _0) -> unsigned{
|
||||||
|
if(is_end) return 0; // return 0 indicates StopIteration
|
||||||
// ...
|
// ...
|
||||||
PyObject* a = VAR(1);
|
PyObject* a = VAR(1);
|
||||||
PyObject* b = VAR(2);
|
PyObject* b = VAR(2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user