diff options
| author | DavePutz <dwputz@gmail.com> | 2020-09-14 16:50:40 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-14 16:50:40 -0500 |
| commit | 2a2a8d64571bf93e2a166626841555fe1753a565 (patch) | |
| tree | a4b7ba795a6e17d4d0b32abd942af380b1c36e57 /extmod | |
| parent | 4a3be4df91837a1c71fcbd62e041f7c45cd4dd4b (diff) | |
| parent | 3d8bac50e41acc286cefbde9e052c5ccb335101e (diff) | |
Merge pull request #28 from adafruit/main
Merge from adafruit/main
Diffstat (limited to 'extmod')
| -rw-r--r-- | extmod/moductypes.c | 2 | ||||
| -rw-r--r-- | extmod/re1.5/recursiveloop.c | 1 | ||||
| -rw-r--r-- | extmod/vfs_fat_file.c | 2 | ||||
| -rw-r--r-- | extmod/vfs_posix_file.c | 2 |
4 files changed, 4 insertions, 3 deletions
diff --git a/extmod/moductypes.c b/extmod/moductypes.c index a384f1e2c..dc8ac4c72 100644 --- a/extmod/moductypes.c +++ b/extmod/moductypes.c @@ -520,7 +520,7 @@ STATIC mp_obj_t uctypes_struct_subscr(mp_obj_t base_in, mp_obj_t index_in, mp_ob uint val_type = GET_TYPE(arr_sz, VAL_TYPE_BITS); arr_sz &= VALUE_MASK(VAL_TYPE_BITS); if (index >= arr_sz) { - nlr_raise(mp_obj_new_exception_msg(&mp_type_IndexError, translate("struct: index out of range"))); + mp_raise_IndexError_varg(translate("%q index out of range"), MP_QSTR_struct); } if (t->len == 2) { diff --git a/extmod/re1.5/recursiveloop.c b/extmod/re1.5/recursiveloop.c index bb337decf..5c1f37a5a 100644 --- a/extmod/re1.5/recursiveloop.c +++ b/extmod/re1.5/recursiveloop.c @@ -22,6 +22,7 @@ recursiveloop(char *pc, const char *sp, Subject *input, const char **subp, int n case Char: if(*sp != *pc++) return 0; + /* FALLTHROUGH */ case Any: sp++; continue; diff --git a/extmod/vfs_fat_file.c b/extmod/vfs_fat_file.c index 0642f4a9c..89786bfa3 100644 --- a/extmod/vfs_fat_file.c +++ b/extmod/vfs_fat_file.c @@ -42,7 +42,7 @@ const byte fresult_to_errno_table[20] = { STATIC void file_obj_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { (void)kind; - mp_printf(print, "<io.%s %p>", mp_obj_get_type_str(self_in), MP_OBJ_TO_PTR(self_in)); + mp_printf(print, "<io.%q %p>", mp_obj_get_type_qstr(self_in), MP_OBJ_TO_PTR(self_in)); } STATIC mp_uint_t file_obj_read(mp_obj_t self_in, void *buf, mp_uint_t size, int *errcode) { diff --git a/extmod/vfs_posix_file.c b/extmod/vfs_posix_file.c index eefc1d905..3f887785e 100644 --- a/extmod/vfs_posix_file.c +++ b/extmod/vfs_posix_file.c @@ -34,7 +34,7 @@ STATIC void check_fd_is_open(const mp_obj_vfs_posix_file_t *o) { STATIC void vfs_posix_file_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { (void)kind; mp_obj_vfs_posix_file_t *self = MP_OBJ_TO_PTR(self_in); - mp_printf(print, "<io.%s %d>", mp_obj_get_type_str(self_in), self->fd); + mp_printf(print, "<io.%q %d>", mp_obj_get_type_qstr(self_in), self->fd); } mp_obj_t mp_vfs_posix_file_open(const mp_obj_type_t *type, mp_obj_t file_in, mp_obj_t mode_in) { |
