summaryrefslogtreecommitdiffstatshomepage
path: root/py/objcomplex.c
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-10-11 12:09:43 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-10-11 15:18:15 +0300
commit1b586f3a734c27c78080fb2173bbde17168cb9e4 (patch)
tree7f7745881473f84a8d10b0b43a45a4c009342406 /py/objcomplex.c
parent53ca6ae1f362da99b5913505a53904d22f460c63 (diff)
downloadmicropython-1b586f3a734c27c78080fb2173bbde17168cb9e4.tar.gz
micropython-1b586f3a734c27c78080fb2173bbde17168cb9e4.zip
py: Rename MP_BOOL() to mp_obj_new_bool() for consistency in naming.
Diffstat (limited to 'py/objcomplex.c')
-rw-r--r--py/objcomplex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/objcomplex.c b/py/objcomplex.c
index b790b05638..231ccf7689 100644
--- a/py/objcomplex.c
+++ b/py/objcomplex.c
@@ -116,7 +116,7 @@ STATIC mp_obj_t complex_make_new(mp_obj_t type_in, mp_uint_t n_args, mp_uint_t n
STATIC mp_obj_t complex_unary_op(mp_uint_t op, mp_obj_t o_in) {
mp_obj_complex_t *o = o_in;
switch (op) {
- case MP_UNARY_OP_BOOL: return MP_BOOL(o->real != 0 || o->imag != 0);
+ case MP_UNARY_OP_BOOL: return mp_obj_new_bool(o->real != 0 || o->imag != 0);
case MP_UNARY_OP_POSITIVE: return o_in;
case MP_UNARY_OP_NEGATIVE: return mp_obj_new_complex(-o->real, -o->imag);
default: return MP_OBJ_NULL; // op not supported
@@ -240,7 +240,7 @@ mp_obj_t mp_obj_complex_binary_op(mp_uint_t op, mp_float_t lhs_real, mp_float_t
break;
}
- case MP_BINARY_OP_EQUAL: return MP_BOOL(lhs_real == rhs_real && lhs_imag == rhs_imag);
+ case MP_BINARY_OP_EQUAL: return mp_obj_new_bool(lhs_real == rhs_real && lhs_imag == rhs_imag);
default:
return MP_OBJ_NULL; // op not supported