summaryrefslogtreecommitdiffstatshomepage
path: root/py/obj.h
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/obj.h
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/obj.h')
-rw-r--r--py/obj.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/py/obj.h b/py/obj.h
index 08fc334c97..745186802c 100644
--- a/py/obj.h
+++ b/py/obj.h
@@ -459,7 +459,7 @@ extern const struct _mp_obj_exception_t mp_const_GeneratorExit_obj;
mp_obj_t mp_obj_new_type(qstr name, mp_obj_t bases_tuple, mp_obj_t locals_dict);
mp_obj_t mp_obj_new_none(void);
-mp_obj_t mp_obj_new_bool(bool value);
+static inline mp_obj_t mp_obj_new_bool(mp_int_t x) { return x ? mp_const_true : mp_const_false; }
mp_obj_t mp_obj_new_cell(mp_obj_t obj);
mp_obj_t mp_obj_new_int(mp_int_t value);
mp_obj_t mp_obj_new_int_from_uint(mp_uint_t value);
@@ -528,10 +528,6 @@ mp_obj_t mp_obj_len_maybe(mp_obj_t o_in); // may return MP_OBJ_NULL
mp_obj_t mp_obj_subscr(mp_obj_t base, mp_obj_t index, mp_obj_t val);
mp_obj_t mp_generic_unary_op(mp_uint_t op, mp_obj_t o_in);
-// bool
-// TODO make lower case when it has proven itself
-static inline mp_obj_t MP_BOOL(mp_int_t x) { return x ? mp_const_true : mp_const_false; }
-
// cell
mp_obj_t mp_obj_cell_get(mp_obj_t self_in);
void mp_obj_cell_set(mp_obj_t self_in, mp_obj_t obj);