Skip to content

Commit ab59e36

Browse files
author
Bob Abeles
committed
Correct problems found by CI
1 parent 66b3ecc commit ab59e36

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

ports/nrf/common-hal/memorymap/AddressRange.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ void common_hal_memorymap_addressrange_construct(memorymap_addressrange_obj_t *s
9090
self->len = length;
9191
}
9292

93-
uint32_t common_hal_memorymap_addressrange_get_length(const memorymap_addressrange_obj_t *self) {
93+
size_t common_hal_memorymap_addressrange_get_length(const memorymap_addressrange_obj_t *self) {
9494
return self->len;
9595
}
9696

9797

9898
void common_hal_memorymap_addressrange_set_bytes(const memorymap_addressrange_obj_t *self,
99-
uint32_t start_index, uint8_t *values, uint32_t len) {
99+
size_t start_index, uint8_t *values, size_t len) {
100100
uint8_t *address = self->start_address + start_index;
101101
#pragma GCC diagnostic push
102102
#pragma GCC diagnostic ignored "-Wcast-align"
@@ -115,7 +115,7 @@ void common_hal_memorymap_addressrange_set_bytes(const memorymap_addressrange_ob
115115
}
116116

117117
void common_hal_memorymap_addressrange_get_bytes(const memorymap_addressrange_obj_t *self,
118-
uint32_t start_index, uint32_t len, uint8_t *values) {
118+
size_t start_index, size_t len, uint8_t *values) {
119119
uint8_t *address = self->start_address + start_index;
120120
#pragma GCC diagnostic push
121121
#pragma GCC diagnostic ignored "-Wcast-align"

py/objint.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,11 @@ mp_int_t mp_obj_int_get_checked(mp_const_obj_t self_in) {
438438
return MP_OBJ_SMALL_INT_VALUE(self_in);
439439
}
440440

441+
mp_uint_t mp_obj_int_get_uint_checked(mp_const_obj_t self_in) {
442+
return MP_OBJ_SMALL_INT_VALUE(self_in);
443+
}
444+
445+
441446
#endif // MICROPY_LONGINT_IMPL == MICROPY_LONGINT_IMPL_NONE
442447

443448
// This dispatcher function is expected to be independent of the implementation of long int

0 commit comments

Comments
 (0)