summaryrefslogtreecommitdiff
path: root/py/vm.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-04-17 23:19:36 +0100
committerDamien George <damien.p.george@gmail.com>2014-04-17 23:19:36 +0100
commitea8d06c39d9c94036e490b300d46f367c9eb78d9 (patch)
treece4999f60f6ca57f22e7d536593a6198ceee0695 /py/vm.c
parent1e935d8689f3d15dc3bd06f08f2a0305b7e1c7f4 (diff)
py: Add MP_OBJ_STOP_ITERATION and make good use of it.
Also make consistent use of MP_OBJ_NOT_SUPPORTED and MP_OBJ_NULL. This helps a lot in debugging and understanding of function API.
Diffstat (limited to 'py/vm.c')
-rw-r--r--py/vm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/vm.c b/py/vm.c
index dbefdc32c..f14899ab4 100644
--- a/py/vm.c
+++ b/py/vm.c
@@ -623,7 +623,7 @@ unwind_jump:
DECODE_ULABEL; // the jump offset if iteration finishes; for labels are always forward
save_sp = sp;
obj1 = mp_iternext_allow_raise(TOP());
- if (obj1 == MP_OBJ_NULL) {
+ if (obj1 == MP_OBJ_STOP_ITERATION) {
--sp; // pop the exhausted iterator
ip += unum; // jump to after for-block
} else {