Skip to content

Commit 570353b

Browse files
committed
Merge remote-tracking branch 'circuitpython/main' into thunderpack1.2
2 parents 4c5e752 + ebdc48a commit 570353b

File tree

50 files changed

+937
-271
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+937
-271
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ jobs:
198198
- "circuitplayground_express_displayio"
199199
- "clue_nrf52840_express"
200200
- "cp32-m4"
201+
- "cp_sapling_m0"
201202
- "datalore_ip_m4"
202203
- "datum_distance"
203204
- "datum_imu"

extmod/machine_mem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
STATIC uintptr_t machine_mem_get_addr(mp_obj_t addr_o, uint align) {
2222
uintptr_t addr = mp_obj_int_get_truncated(addr_o);
2323
if ((addr & (align - 1)) != 0) {
24-
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError, translate("address %08x is not aligned to %d bytes"), addr, align));
24+
mp_raise_ValueError_varg(translate("address %08x is not aligned to %d bytes"), addr, align);
2525
}
2626
return addr;
2727
}

extmod/moduheapq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(mod_uheapq_heappush_obj, mod_uheapq_heappush);
6262
STATIC mp_obj_t mod_uheapq_heappop(mp_obj_t heap_in) {
6363
mp_obj_list_t *heap = get_heap(heap_in);
6464
if (heap->len == 0) {
65-
nlr_raise(mp_obj_new_exception_msg(&mp_type_IndexError, translate("empty heap")));
65+
mp_raise_IndexError(translate("empty heap"));
6666
}
6767
mp_obj_t item = heap->items[0];
6868
heap->len -= 1;

extmod/modure.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ STATIC mp_obj_t match_group(mp_obj_t self_in, mp_obj_t no_in) {
4343
mp_obj_match_t *self = MP_OBJ_TO_PTR(self_in);
4444
mp_int_t no = mp_obj_get_int(no_in);
4545
if (no < 0 || no >= self->num_matches) {
46-
nlr_raise(mp_obj_new_exception_arg1(&mp_type_IndexError, no_in));
46+
mp_raise_arg1(&mp_type_IndexError, no_in);
4747
}
4848

4949
const char *start = self->caps[no * 2];
@@ -82,7 +82,7 @@ STATIC void match_span_helper(size_t n_args, const mp_obj_t *args, mp_obj_t span
8282
if (n_args == 2) {
8383
no = mp_obj_get_int(args[1]);
8484
if (no < 0 || no >= self->num_matches) {
85-
nlr_raise(mp_obj_new_exception_arg1(&mp_type_IndexError, args[1]));
85+
mp_raise_arg1(&mp_type_IndexError, args[1]);
8686
}
8787
}
8888

@@ -326,7 +326,7 @@ STATIC mp_obj_t re_sub_helper(mp_obj_t self_in, size_t n_args, const mp_obj_t *a
326326
}
327327

328328
if (match_no >= (unsigned int)match->num_matches) {
329-
nlr_raise(mp_obj_new_exception_arg1(&mp_type_IndexError, MP_OBJ_NEW_SMALL_INT(match_no)));
329+
mp_raise_arg1(&mp_type_IndexError, MP_OBJ_NEW_SMALL_INT(match_no));
330330
}
331331

332332
const char *start_match = match->caps[match_no * 2];

extmod/moduzlib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ STATIC mp_obj_t mod_uzlib_decompress(size_t n_args, const mp_obj_t *args) {
179179
return res;
180180

181181
error:
182-
nlr_raise(mp_obj_new_exception_arg1(&mp_type_ValueError, MP_OBJ_NEW_SMALL_INT(st)));
182+
mp_raise_arg1(&mp_type_ValueError, MP_OBJ_NEW_SMALL_INT(st));
183183
}
184184
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_uzlib_decompress_obj, 1, 3, mod_uzlib_decompress);
185185

extmod/ulab

Submodule ulab updated 81 files

extmod/vfs_posix_file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ typedef struct _mp_obj_vfs_posix_file_t {
2424
#ifdef MICROPY_CPYTHON_COMPAT
2525
STATIC void check_fd_is_open(const mp_obj_vfs_posix_file_t *o) {
2626
if (o->fd < 0) {
27-
nlr_raise(mp_obj_new_exception_msg(&mp_type_ValueError, translate("I/O operation on closed file")));
27+
mp_raise_ValueError(translate("I/O operation on closed file"));
2828
}
2929
}
3030
#else

0 commit comments

Comments
 (0)