summaryrefslogtreecommitdiff
path: root/py/objtuple.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-08-30 00:35:11 +0100
committerDamien George <damien.p.george@gmail.com>2014-08-30 00:35:11 +0100
commitecc88e949ca5e307d22da4605a40d39ea2df9e3b (patch)
treea2399541ebd9f2e8b2141805dc39473891be6456 /py/objtuple.c
parent4d3fc4632681576eed8235f8b90b49a032c80218 (diff)
Change some parts of the core API to use mp_uint_t instead of uint/int.
Addressing issue #50, still some way to go yet.
Diffstat (limited to 'py/objtuple.c')
-rw-r--r--py/objtuple.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/py/objtuple.c b/py/objtuple.c
index 377fbf543..39fda748d 100644
--- a/py/objtuple.c
+++ b/py/objtuple.c
@@ -56,7 +56,7 @@ void mp_obj_tuple_print(void (*print)(void *env, const char *fmt, ...), void *en
print(env, ")");
}
-STATIC mp_obj_t mp_obj_tuple_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const mp_obj_t *args) {
+STATIC mp_obj_t mp_obj_tuple_make_new(mp_obj_t type_in, mp_uint_t n_args, mp_uint_t n_kw, const mp_obj_t *args) {
mp_arg_check_num(n_args, n_kw, 0, 1, false);
switch (n_args) {
@@ -96,7 +96,7 @@ STATIC mp_obj_t mp_obj_tuple_make_new(mp_obj_t type_in, uint n_args, uint n_kw,
}
// Don't pass MP_BINARY_OP_NOT_EQUAL here
-STATIC bool tuple_cmp_helper(int op, mp_obj_t self_in, mp_obj_t another_in) {
+STATIC bool tuple_cmp_helper(mp_uint_t op, mp_obj_t self_in, mp_obj_t another_in) {
mp_obj_type_t *self_type = mp_obj_get_type(self_in);
if (self_type->getiter != mp_obj_tuple_getiter) {
assert(0);
@@ -115,7 +115,7 @@ STATIC bool tuple_cmp_helper(int op, mp_obj_t self_in, mp_obj_t another_in) {
return mp_seq_cmp_objs(op, self->items, self->len, another->items, another->len);
}
-mp_obj_t mp_obj_tuple_unary_op(int op, mp_obj_t self_in) {
+mp_obj_t mp_obj_tuple_unary_op(mp_uint_t op, mp_obj_t self_in) {
mp_obj_tuple_t *self = self_in;
switch (op) {
case MP_UNARY_OP_BOOL: return MP_BOOL(self->len != 0);
@@ -124,7 +124,7 @@ mp_obj_t mp_obj_tuple_unary_op(int op, mp_obj_t self_in) {
}
}
-mp_obj_t mp_obj_tuple_binary_op(int op, mp_obj_t lhs, mp_obj_t rhs) {
+mp_obj_t mp_obj_tuple_binary_op(mp_uint_t op, mp_obj_t lhs, mp_obj_t rhs) {
mp_obj_tuple_t *o = lhs;
switch (op) {
case MP_BINARY_OP_ADD: {
@@ -194,7 +194,7 @@ STATIC mp_obj_t tuple_count(mp_obj_t self_in, mp_obj_t value) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_2(tuple_count_obj, tuple_count);
-STATIC mp_obj_t tuple_index(uint n_args, const mp_obj_t *args) {
+STATIC mp_obj_t tuple_index(mp_uint_t n_args, const mp_obj_t *args) {
assert(MP_OBJ_IS_TYPE(args[0], &mp_type_tuple));
mp_obj_tuple_t *self = args[0];
return mp_seq_index_obj(self->items, self->len, n_args, args);