py: Remove use of int type in obj.h.
Part of code cleanup, working towards resolving issue #50.
diff --git a/py/obj.c b/py/obj.c
index 31302b8..4a9cf7f 100644
--- a/py/obj.c
+++ b/py/obj.c
@@ -111,7 +111,7 @@
printf("\n");
}
-int mp_obj_is_true(mp_obj_t arg) {
+bool mp_obj_is_true(mp_obj_t arg) {
if (arg == mp_const_false) {
return 0;
} else if (arg == mp_const_true) {
@@ -414,7 +414,7 @@
}
MP_DEFINE_CONST_FUN_OBJ_1(mp_identity_obj, mp_identity);
-bool mp_get_buffer(mp_obj_t obj, mp_buffer_info_t *bufinfo, int flags) {
+bool mp_get_buffer(mp_obj_t obj, mp_buffer_info_t *bufinfo, mp_uint_t flags) {
mp_obj_type_t *type = mp_obj_get_type(obj);
if (type->buffer_p.get_buffer == NULL) {
return false;
@@ -426,7 +426,7 @@
return true;
}
-void mp_get_buffer_raise(mp_obj_t obj, mp_buffer_info_t *bufinfo, int flags) {
+void mp_get_buffer_raise(mp_obj_t obj, mp_buffer_info_t *bufinfo, mp_uint_t flags) {
if (!mp_get_buffer(obj, bufinfo, flags)) {
nlr_raise(mp_obj_new_exception_msg(&mp_type_TypeError, "object with buffer protocol required"));
}