Skip to content

Commit 0e0941d

Browse files
author
Bob Abeles
committed
Review changes
1 parent 79edcbe commit 0e0941d

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

locale/circuitpython.pot

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2136,10 +2136,6 @@ msgstr ""
21362136
msgid "UUID value is not str, int or byte buffer"
21372137
msgstr ""
21382138

2139-
#: ports/raspberrypi/common-hal/memorymap/AddressRange.c
2140-
msgid "Unable to access unaliged IO register"
2141-
msgstr ""
2142-
21432139
#: ports/raspberrypi/common-hal/memorymap/AddressRange.c
21442140
msgid "Unable to access unaligned IO register"
21452141
msgstr ""
@@ -4052,10 +4048,6 @@ msgstr ""
40524048
msgid "source_bitmap must have value_count of 8"
40534049
msgstr ""
40544050

4055-
#: shared-bindings/memorymap/AddressRange.c
4056-
msgid "start must be an int"
4057-
msgstr ""
4058-
40594051
#: py/objstr.c
40604052
msgid "start/end indices"
40614053
msgstr ""

shared-bindings/memorymap/AddressRange.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ STATIC mp_obj_t memorymap_addressrange_make_new(const mp_obj_type_t *type, size_
9797
} else if (mp_obj_is_type(args[ARG_start].u_obj, &mp_type_int)) {
9898
start = mp_obj_int_get_uint_checked(args[ARG_start].u_obj);
9999
} else {
100-
mp_raise_TypeError(translate("start must be an int"));
100+
mp_obj_t arg = mp_unary_op(MP_UNARY_OP_INT, args[ARG_start].u_obj);
101+
start = mp_obj_int_get_uint_checked(arg);
101102
}
102103
size_t length =
103104
mp_arg_validate_int_min(args[ARG_length].u_int, 1, MP_QSTR_length);

0 commit comments

Comments
 (0)