summaryrefslogtreecommitdiff
path: root/py/runtime.c
diff options
context:
space:
mode:
authorDamien <damien.p.george@gmail.com>2013-12-21 18:38:03 +0000
committerDamien <damien.p.george@gmail.com>2013-12-21 18:38:03 +0000
commitd9d6201b5292308e23b07907350603fafd93f92f (patch)
tree776400068f989f5095b28573043559b8a5b2cdf0 /py/runtime.c
parentd99b05282d14ceb0163cbcd059aa37bdb415af43 (diff)
py: simplify __next__ method for generators.
Diffstat (limited to 'py/runtime.c')
-rw-r--r--py/runtime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/runtime.c b/py/runtime.c
index a3d11f3c6..7d1357a3f 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -772,7 +772,7 @@ mp_obj_t rt_load_attr(mp_obj_t base, qstr attr) {
void rt_load_method(mp_obj_t base, qstr attr, mp_obj_t *dest) {
DEBUG_OP_printf("load method %s\n", qstr_str(attr));
if (MP_OBJ_IS_TYPE(base, &gen_instance_type) && attr == rt_q___next__) {
- dest[1] = (mp_obj_t)&mp_obj_gen_instance_next_obj;
+ dest[1] = (mp_obj_t)&mp_builtin_next_obj;
dest[0] = base;
return;
} else if (MP_OBJ_IS_TYPE(base, &instance_type)) {