py: Use size_t as len argument and return type of mp_get_index.

These values are used to compute memory addresses and so size_t is the
more appropriate type to use.
This commit is contained in:
Damien George
2017-03-23 16:17:40 +11:00
parent 3f3df43501
commit c88cfe165b
9 changed files with 17 additions and 15 deletions

View File

@@ -471,7 +471,7 @@ STATIC mp_obj_t array_subscr(mp_obj_t self_in, mp_obj_t index_in, mp_obj_t value
return MP_OBJ_FROM_PTR(res);
#endif
} else {
mp_uint_t index = mp_get_index(o->base.type, o->len, index_in, false);
size_t index = mp_get_index(o->base.type, o->len, index_in, false);
#if MICROPY_PY_BUILTINS_MEMORYVIEW
if (o->base.type == &mp_type_memoryview) {
index += o->free;