mirror of
https://github.com/micropython/micropython.git
synced 2025-08-12 05:31:49 +02:00
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:
@@ -120,7 +120,7 @@ const byte *str_index_to_ptr(const mp_obj_type_t *type, const byte *self_data, s
|
||||
// so it must handle bytes.
|
||||
if (type == &mp_type_bytes) {
|
||||
// Taken from objstr.c:str_index_to_ptr()
|
||||
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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user