py: Rename MP_OBJ_NOT_SUPPORTED to MP_OBJ_NULL.
See issue #608 for justification.
diff --git a/py/objtuple.c b/py/objtuple.c
index 44ee95d..4651537 100644
--- a/py/objtuple.c
+++ b/py/objtuple.c
@@ -120,7 +120,7 @@
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_NOT_SUPPORTED;
+ default: return MP_OBJ_NULL; // op not supported
}
}
@@ -129,7 +129,7 @@
switch (op) {
case MP_BINARY_OP_ADD: {
if (!mp_obj_is_subclass_fast(mp_obj_get_type(rhs), (mp_obj_t)&mp_type_tuple)) {
- return MP_OBJ_NOT_SUPPORTED;
+ return MP_OBJ_NULL; // op not supported
}
mp_obj_tuple_t *p = rhs;
mp_obj_tuple_t *s = mp_obj_new_tuple(o->len + p->len, NULL);
@@ -138,7 +138,7 @@
}
case MP_BINARY_OP_MULTIPLY: {
if (!MP_OBJ_IS_SMALL_INT(rhs)) {
- return MP_OBJ_NOT_SUPPORTED;
+ return MP_OBJ_NULL; // op not supported
}
int n = MP_OBJ_SMALL_INT_VALUE(rhs);
mp_obj_tuple_t *s = mp_obj_new_tuple(o->len * n, NULL);
@@ -153,8 +153,7 @@
return MP_BOOL(tuple_cmp_helper(op, lhs, rhs));
default:
- // op not supported
- return MP_OBJ_NOT_SUPPORTED;
+ return MP_OBJ_NULL; // op not supported
}
}
@@ -176,7 +175,7 @@
uint index_value = mp_get_index(self->base.type, self->len, index, false);
return self->items[index_value];
} else {
- return MP_OBJ_NOT_SUPPORTED;
+ return MP_OBJ_NULL; // op not supported
}
}