diff options
Diffstat (limited to 'py/vm.c')
-rw-r--r-- | py/vm.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -744,7 +744,7 @@ unwind_jump:; assert(TOP()); mp_obj_t value = mp_iternext_allow_raise(TOP()); if (value == MP_OBJ_STOP_ITERATION) { - --sp; // pop the exhausted iterator + sp -= 5; // pop the exhausted iterator ip += ulab; // jump to after for-block } else { PUSH(value); // push the next iteration value @@ -1294,7 +1294,7 @@ exception_handler: const byte *ip = code_state->ip + 1; DECODE_ULABEL; // the jump offset if iteration finishes; for labels are always forward code_state->ip = ip + ulab; // jump to after for-block - code_state->sp -= 1; // pop the exhausted iterator + code_state->sp -= 5; // pop the exhausted iterator goto outer_dispatch_loop; // continue with dispatch loop } else if (*code_state->ip == MP_BC_YIELD_FROM) { // StopIteration inside yield from call means return a value of |