diff options
| author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-10-11 12:09:43 +0300 |
|---|---|---|
| committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-10-11 15:18:15 +0300 |
| commit | 1b586f3a734c27c78080fb2173bbde17168cb9e4 (patch) | |
| tree | 7f7745881473f84a8d10b0b43a45a4c009342406 /py/objdict.c | |
| parent | 53ca6ae1f362da99b5913505a53904d22f460c63 (diff) | |
py: Rename MP_BOOL() to mp_obj_new_bool() for consistency in naming.
Diffstat (limited to 'py/objdict.c')
| -rw-r--r-- | py/objdict.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/py/objdict.c b/py/objdict.c index c4725705d..725c708c2 100644 --- a/py/objdict.c +++ b/py/objdict.c @@ -103,7 +103,7 @@ STATIC mp_obj_t dict_make_new(mp_obj_t type_in, mp_uint_t n_args, mp_uint_t n_kw STATIC mp_obj_t dict_unary_op(mp_uint_t op, mp_obj_t self_in) { mp_obj_dict_t *self = MP_OBJ_CAST(self_in); switch (op) { - case MP_UNARY_OP_BOOL: return MP_BOOL(self->map.used != 0); + case MP_UNARY_OP_BOOL: return mp_obj_new_bool(self->map.used != 0); case MP_UNARY_OP_LEN: return MP_OBJ_NEW_SMALL_INT(self->map.used); default: return MP_OBJ_NULL; // op not supported } @@ -114,7 +114,7 @@ STATIC mp_obj_t dict_binary_op(mp_uint_t op, mp_obj_t lhs_in, mp_obj_t rhs_in) { switch (op) { case MP_BINARY_OP_IN: { mp_map_elem_t *elem = mp_map_lookup(&o->map, rhs_in, MP_MAP_LOOKUP); - return MP_BOOL(elem != NULL); + return mp_obj_new_bool(elem != NULL); } case MP_BINARY_OP_EQUAL: { #if MICROPY_PY_COLLECTIONS_ORDEREDDICT |
