mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 20:20:14 +01:00
mp_resume: Dare to pass send_value of NULL.
There was thinkos that either send_value or throw_value is specified, but there were cases with both. Note that send_value is pushed onto generator's stack - but that's probably only good, because if we throw exception into gen, it should not ever use send_value, and that will be just extra "assert".
This commit is contained in:
2
py/vm.c
2
py/vm.c
@@ -764,7 +764,7 @@ yield:
|
||||
if (inject_exc != MP_OBJ_NULL) {
|
||||
t_exc = inject_exc;
|
||||
inject_exc = MP_OBJ_NULL;
|
||||
ret_kind = mp_resume(TOP(), mp_const_none, t_exc, &obj2);
|
||||
ret_kind = mp_resume(TOP(), MP_OBJ_NULL, t_exc, &obj2);
|
||||
} else {
|
||||
ret_kind = mp_resume(TOP(), obj1, MP_OBJ_NULL, &obj2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user