summaryrefslogtreecommitdiffstatshomepage
path: root/py/objstr.c
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-03-30 22:00:12 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-03-30 23:37:24 +0300
commitf7eaf605c0b52217ea45a1e0a33cbba3e0a8a2ab (patch)
treeb0869cc49ef0d1972529f7431d67a1037a57fecb /py/objstr.c
parentf39d3b93da4b9205a095430e12472051c6b22ef6 (diff)
downloadmicropython-f7eaf605c0b52217ea45a1e0a33cbba3e0a8a2ab.tar.gz
micropython-f7eaf605c0b52217ea45a1e0a33cbba3e0a8a2ab.zip
py: Fix "TypeError: 'iterator' object is not iterable", doh.
Diffstat (limited to 'py/objstr.c')
-rw-r--r--py/objstr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/py/objstr.c b/py/objstr.c
index 2dd7015c58..751f93afd7 100644
--- a/py/objstr.c
+++ b/py/objstr.c
@@ -885,6 +885,7 @@ STATIC mp_obj_t str_it_iternext(mp_obj_t self_in) {
STATIC const mp_obj_type_t mp_type_str_it = {
{ &mp_type_type },
.name = MP_QSTR_iterator,
+ .getiter = mp_identity,
.iternext = str_it_iternext,
};
@@ -903,6 +904,7 @@ STATIC mp_obj_t bytes_it_iternext(mp_obj_t self_in) {
STATIC const mp_obj_type_t mp_type_bytes_it = {
{ &mp_type_type },
.name = MP_QSTR_iterator,
+ .getiter = mp_identity,
.iternext = bytes_it_iternext,
};