From d0df10b2c6192449747280e91ca56a185398288d Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 9 Feb 2015 16:59:15 +0000 Subject: [PATCH] py: Don't unnecessarily create a bound method. --- py/objtype.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/py/objtype.c b/py/objtype.c index d10d6cbd5a..011fb9a28d 100644 --- a/py/objtype.c +++ b/py/objtype.c @@ -662,8 +662,7 @@ STATIC mp_obj_t instance_getiter(mp_obj_t self_in) { mp_obj_type_t *type = mp_obj_get_type(self->subobj[0]); return type->getiter(self->subobj[0]); } - mp_obj_t meth = mp_obj_new_bound_meth(member[0], self); - return mp_call_function_n_kw(meth, 0, 0, NULL); + return mp_call_method_n_kw(0, 0, member); } STATIC mp_int_t instance_get_buffer(mp_obj_t self_in, mp_buffer_info_t *bufinfo, mp_uint_t flags) {