diff options
Diffstat (limited to 'py/objtuple.c')
-rw-r--r-- | py/objtuple.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/py/objtuple.c b/py/objtuple.c index 57b313fd6b..e6b902d74f 100644 --- a/py/objtuple.c +++ b/py/objtuple.c @@ -52,7 +52,7 @@ mp_obj_t mp_obj_tuple_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const m mp_obj_t iterable = mp_getiter(args[0]); mp_obj_t item; - while ((item = mp_iternext(iterable)) != MP_OBJ_NULL) { + while ((item = mp_iternext(iterable)) != MP_OBJ_STOP_ITERATION) { if (len >= alloc) { items = m_renew(mp_obj_t, items, alloc, alloc * 2); alloc *= 2; @@ -88,7 +88,7 @@ mp_obj_t tuple_unary_op(int op, mp_obj_t self_in) { switch (op) { case MP_UNARY_OP_BOOL: return MP_BOOL(self->len != 0); case MP_UNARY_OP_LEN: return MP_OBJ_NEW_SMALL_INT(self->len); - default: return MP_OBJ_NULL; // op not supported for None + default: return MP_OBJ_NOT_SUPPORTED; } } @@ -249,7 +249,7 @@ STATIC mp_obj_t tuple_it_iternext(mp_obj_t self_in) { self->cur += 1; return o_out; } else { - return MP_OBJ_NULL; + return MP_OBJ_STOP_ITERATION; } } |