objgenerator: mp_obj_gen_resume() suitable only for generators.

This commit is contained in:
Paul Sokolovsky 2014-03-30 02:32:30 +02:00
parent 8d9cc2e669
commit aaff716189
1 changed files with 1 additions and 0 deletions

View File

@ -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) { 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; mp_obj_gen_instance_t *self = self_in;
if (self->ip == 0) { if (self->ip == 0) {
*ret_val = MP_OBJ_NULL; *ret_val = MP_OBJ_NULL;