Commit aaff7161 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

objgenerator: mp_obj_gen_resume() suitable only for generators.

parent 8d9cc2e6
......@@ -75,6 +75,7 @@ mp_obj_t gen_instance_getiter(mp_obj_t self_in) {
}
mp_vm_return_kind_t mp_obj_gen_resume(mp_obj_t self_in, mp_obj_t send_value, mp_obj_t throw_value, mp_obj_t *ret_val) {
assert(MP_OBJ_IS_TYPE(self_in, &mp_type_gen_instance));
mp_obj_gen_instance_t *self = self_in;
if (self->ip == 0) {
*ret_val = MP_OBJ_NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment