aboutsummaryrefslogtreecommitdiff
path: root/py/objmap.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-03-27 12:19:24 +1100
committerDamien George <damien.p.george@gmail.com>2017-03-27 12:19:24 +1100
commit54507f78eeab740eca275b724029d1351c789da6 (patch)
treec716c2bba7e735f93b1e947be7d550cf5d235639 /py/objmap.c
parentf648e5442bd9ebc1f63b761909d257b6576f3878 (diff)
py/objmap: Convert mp_uint_t to size_t.
Diffstat (limited to 'py/objmap.c')
-rw-r--r--py/objmap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/py/objmap.c b/py/objmap.c
index 0b2189016..111c964fd 100644
--- a/py/objmap.c
+++ b/py/objmap.c
@@ -31,7 +31,7 @@
typedef struct _mp_obj_map_t {
mp_obj_base_t base;
- mp_uint_t n_iters;
+ size_t n_iters;
mp_obj_t fun;
mp_obj_t iters[];
} mp_obj_map_t;
@@ -42,7 +42,7 @@ STATIC mp_obj_t map_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_
o->base.type = type;
o->n_iters = n_args - 1;
o->fun = args[0];
- for (mp_uint_t i = 0; i < n_args - 1; i++) {
+ for (size_t i = 0; i < n_args - 1; i++) {
o->iters[i] = mp_getiter(args[i + 1], NULL);
}
return MP_OBJ_FROM_PTR(o);
@@ -53,7 +53,7 @@ STATIC mp_obj_t map_iternext(mp_obj_t self_in) {
mp_obj_map_t *self = MP_OBJ_TO_PTR(self_in);
mp_obj_t *nextses = m_new(mp_obj_t, self->n_iters);
- for (mp_uint_t i = 0; i < self->n_iters; i++) {
+ for (size_t i = 0; i < self->n_iters; i++) {
mp_obj_t next = mp_iternext(self->iters[i]);
if (next == MP_OBJ_STOP_ITERATION) {
m_del(mp_obj_t, nextses, self->n_iters);