Review changes

This commit is contained in:
Bob Abeles 2023-09-07 16:45:45 -07:00
parent 79edcbe97d
commit 0e0941d6fd
2 changed files with 2 additions and 9 deletions

View File

@ -2136,10 +2136,6 @@ msgstr ""
msgid "UUID value is not str, int or byte buffer" msgid "UUID value is not str, int or byte buffer"
msgstr "" msgstr ""
#: ports/raspberrypi/common-hal/memorymap/AddressRange.c
msgid "Unable to access unaliged IO register"
msgstr ""
#: ports/raspberrypi/common-hal/memorymap/AddressRange.c #: ports/raspberrypi/common-hal/memorymap/AddressRange.c
msgid "Unable to access unaligned IO register" msgid "Unable to access unaligned IO register"
msgstr "" msgstr ""
@ -4052,10 +4048,6 @@ msgstr ""
msgid "source_bitmap must have value_count of 8" msgid "source_bitmap must have value_count of 8"
msgstr "" msgstr ""
#: shared-bindings/memorymap/AddressRange.c
msgid "start must be an int"
msgstr ""
#: py/objstr.c #: py/objstr.c
msgid "start/end indices" msgid "start/end indices"
msgstr "" msgstr ""

View File

@ -97,7 +97,8 @@ STATIC mp_obj_t memorymap_addressrange_make_new(const mp_obj_type_t *type, size_
} else if (mp_obj_is_type(args[ARG_start].u_obj, &mp_type_int)) { } else if (mp_obj_is_type(args[ARG_start].u_obj, &mp_type_int)) {
start = mp_obj_int_get_uint_checked(args[ARG_start].u_obj); start = mp_obj_int_get_uint_checked(args[ARG_start].u_obj);
} else { } else {
mp_raise_TypeError(translate("start must be an int")); mp_obj_t arg = mp_unary_op(MP_UNARY_OP_INT, args[ARG_start].u_obj);
start = mp_obj_int_get_uint_checked(arg);
} }
size_t length = size_t length =
mp_arg_validate_int_min(args[ARG_length].u_int, 1, MP_QSTR_length); mp_arg_validate_int_min(args[ARG_length].u_int, 1, MP_QSTR_length);