aboutsummaryrefslogtreecommitdiff
path: root/py/objbool.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-03-30 13:35:08 +0100
committerDamien George <damien.p.george@gmail.com>2014-03-30 13:35:08 +0100
commitd17926db710189db97a49e9b2e72d782fc404231 (patch)
tree406396ee6f3010511a606dd4ea3ed5a817d959eb /py/objbool.c
parent09d207785c77c85c957471b064ceebe0d2ee0a23 (diff)
Rename rt_* to mp_*.
Mostly just a global search and replace. Except rt_is_true which becomes mp_obj_is_true. Still would like to tidy up some of the names, but this will do for now.
Diffstat (limited to 'py/objbool.c')
-rw-r--r--py/objbool.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/py/objbool.c b/py/objbool.c
index 5f17fd613..6afb6e950 100644
--- a/py/objbool.c
+++ b/py/objbool.c
@@ -26,7 +26,7 @@ STATIC mp_obj_t bool_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const mp
switch (n_args) {
case 0: return mp_const_false;
- case 1: if (rt_is_true(args[0])) { return mp_const_true; } else { return mp_const_false; }
+ case 1: if (mp_obj_is_true(args[0])) { return mp_const_true; } else { return mp_const_false; }
default: nlr_jump(mp_obj_new_exception_msg_varg(&mp_type_TypeError, "bool takes at most 1 argument, %d given", n_args));
}
}
@@ -34,10 +34,10 @@ STATIC mp_obj_t bool_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const mp
STATIC mp_obj_t bool_unary_op(int op, mp_obj_t o_in) {
machine_int_t value = ((mp_obj_bool_t*)o_in)->value;
switch (op) {
- case RT_UNARY_OP_BOOL: return o_in;
- case RT_UNARY_OP_POSITIVE: return MP_OBJ_NEW_SMALL_INT(value);
- case RT_UNARY_OP_NEGATIVE: return MP_OBJ_NEW_SMALL_INT(-value);
- case RT_UNARY_OP_INVERT:
+ case MP_UNARY_OP_BOOL: return o_in;
+ case MP_UNARY_OP_POSITIVE: return MP_OBJ_NEW_SMALL_INT(value);
+ case MP_UNARY_OP_NEGATIVE: return MP_OBJ_NEW_SMALL_INT(-value);
+ case MP_UNARY_OP_INVERT:
default: // no other cases
return MP_OBJ_NEW_SMALL_INT(~value);
}