diff options
Diffstat (limited to 'py/objstr.c')
-rw-r--r-- | py/objstr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/py/objstr.c b/py/objstr.c index 1e71617bda..4053efb889 100644 --- a/py/objstr.c +++ b/py/objstr.c @@ -388,7 +388,7 @@ mp_obj_t mp_obj_str_binary_op(mp_uint_t op, mp_obj_t lhs_in, mp_obj_t rhs_in) { // objstrunicode defines own version const byte *str_index_to_ptr(const mp_obj_type_t *type, const byte *self_data, size_t self_len, mp_obj_t index, bool is_slice) { - mp_uint_t index_val = mp_get_index(type, self_len, index, is_slice); + size_t index_val = mp_get_index(type, self_len, index, is_slice); return self_data + index_val; } #endif @@ -408,7 +408,7 @@ STATIC mp_obj_t bytes_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) { return mp_obj_new_str_of_type(type, self_data + slice.start, slice.stop - slice.start); } #endif - mp_uint_t index_val = mp_get_index(type, self_len, index, false); + size_t index_val = mp_get_index(type, self_len, index, false); // If we have unicode enabled the type will always be bytes, so take the short cut. if (MICROPY_PY_BUILTINS_STR_UNICODE || type == &mp_type_bytes) { return MP_OBJ_NEW_SMALL_INT(self_data[index_val]); |