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.
diff --git a/py/objbool.c b/py/objbool.c
index 5f17fd6..6afb6e9 100644
--- a/py/objbool.c
+++ b/py/objbool.c
@@ -26,7 +26,7 @@
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_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);
}