Skip to content

Commit d0df10b

Browse files
committed
py: Don't unnecessarily create a bound method.
1 parent 4824404 commit d0df10b

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

py/objtype.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,8 +662,7 @@ STATIC mp_obj_t instance_getiter(mp_obj_t self_in) {
662662
mp_obj_type_t *type = mp_obj_get_type(self->subobj[0]);
663663
return type->getiter(self->subobj[0]);
664664
}
665-
mp_obj_t meth = mp_obj_new_bound_meth(member[0], self);
666-
return mp_call_function_n_kw(meth, 0, 0, NULL);
665+
return mp_call_method_n_kw(0, 0, member);
667666
}
668667

669668
STATIC mp_int_t instance_get_buffer(mp_obj_t self_in, mp_buffer_info_t *bufinfo, mp_uint_t flags) {

0 commit comments

Comments
 (0)