py: Rename MP_BOOL() to mp_obj_new_bool() for consistency in naming.
diff --git a/py/objset.c b/py/objset.c
index 9b70ce6..55aedde 100644
--- a/py/objset.c
+++ b/py/objset.c
@@ -366,7 +366,7 @@
if (cleanup_other) {
set_clear(other);
}
- return MP_BOOL(out);
+ return mp_obj_new_bool(out);
}
STATIC mp_obj_t set_issubset(mp_obj_t self_in, mp_obj_t other_in) {
return set_issubset_internal(self_in, other_in, false);
@@ -471,7 +471,7 @@
STATIC mp_obj_t set_unary_op(mp_uint_t op, mp_obj_t self_in) {
mp_obj_set_t *self = self_in;
switch (op) {
- case MP_UNARY_OP_BOOL: return MP_BOOL(self->set.used != 0);
+ case MP_UNARY_OP_BOOL: return mp_obj_new_bool(self->set.used != 0);
case MP_UNARY_OP_LEN: return MP_OBJ_NEW_SMALL_INT(self->set.used);
#if MICROPY_PY_BUILTINS_FROZENSET
case MP_UNARY_OP_HASH:
@@ -525,7 +525,7 @@
case MP_BINARY_OP_IN: {
mp_obj_set_t *o = lhs;
mp_obj_t elem = mp_set_lookup(&o->set, rhs, MP_MAP_LOOKUP);
- return MP_BOOL(elem != NULL);
+ return mp_obj_new_bool(elem != NULL);
}
default:
return MP_OBJ_NULL; // op not supported