From 75d6abe3bb57cf75915a056e5e98e4b79efec2ad Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 24 Feb 2017 16:46:38 +0100 Subject: [PATCH] Correct name of mp_raise_NotImplementedError to make error name. --- atmel-samd/common-hal/nativeio/TouchInStub.c | 2 +- extmod/modlwip.c | 2 +- extmod/modure.c | 2 +- extmod/modussl_axtls.c | 2 +- extmod/modussl_mbedtls.c | 2 +- py/argcheck.c | 2 +- py/lexer.c | 2 +- py/objarray.c | 6 +++--- py/objint.c | 4 ++-- py/objlist.c | 4 ++-- py/objstr.c | 8 ++++---- py/objstrunicode.c | 2 +- py/objtuple.c | 2 +- py/runtime.c | 2 +- py/runtime.h | 2 +- unix/modjni.c | 2 +- 16 files changed, 23 insertions(+), 23 deletions(-) diff --git a/atmel-samd/common-hal/nativeio/TouchInStub.c b/atmel-samd/common-hal/nativeio/TouchInStub.c index 5165c806f6..cfdc1249fe 100644 --- a/atmel-samd/common-hal/nativeio/TouchInStub.c +++ b/atmel-samd/common-hal/nativeio/TouchInStub.c @@ -34,7 +34,7 @@ void common_hal_nativeio_touchin_construct(nativeio_touchin_obj_t* self, const mcu_pin_obj_t *pin) { - mp_raise_NotImplementError("No capacitive touch support"); + mp_raise_NotImplementedError("No capacitive touch support"); } void common_hal_nativeio_touchin_deinit(nativeio_touchin_obj_t* self) { diff --git a/extmod/modlwip.c b/extmod/modlwip.c index 57fb2845fb..9194fa5e4b 100644 --- a/extmod/modlwip.c +++ b/extmod/modlwip.c @@ -1025,7 +1025,7 @@ STATIC mp_obj_t lwip_socket_sendall(mp_obj_t self_in, mp_obj_t buf_in) { break; } case MOD_NETWORK_SOCK_DGRAM: - mp_raise_NotImplementError(""); + mp_raise_NotImplementedError(""); break; } diff --git a/extmod/modure.c b/extmod/modure.c index ba8a2e07ad..6cd7007639 100644 --- a/extmod/modure.c +++ b/extmod/modure.c @@ -153,7 +153,7 @@ STATIC mp_obj_t re_split(size_t n_args, const mp_obj_t *args) { mp_obj_t s = mp_obj_new_str(subj.begin, caps[0] - subj.begin, false); mp_obj_list_append(retval, s); if (self->re.sub > 0) { - mp_raise_NotImplementError("Splitting with sub-captures"); + mp_raise_NotImplementedError("Splitting with sub-captures"); } subj.begin = caps[1]; if (maxsplit > 0 && --maxsplit == 0) { diff --git a/extmod/modussl_axtls.c b/extmod/modussl_axtls.c index f238fb7c1a..429742f7ca 100644 --- a/extmod/modussl_axtls.c +++ b/extmod/modussl_axtls.c @@ -126,7 +126,7 @@ STATIC mp_obj_t socket_setblocking(mp_obj_t self_in, mp_obj_t flag_in) { // Currently supports only blocking mode (void)self_in; if (!mp_obj_is_true(flag_in)) { - mp_raise_NotImplementError(""); + mp_raise_NotImplementedError(""); } return mp_const_none; } diff --git a/extmod/modussl_mbedtls.c b/extmod/modussl_mbedtls.c index 82ad262c4f..291d4bb0cf 100644 --- a/extmod/modussl_mbedtls.c +++ b/extmod/modussl_mbedtls.c @@ -219,7 +219,7 @@ STATIC mp_obj_t socket_setblocking(mp_obj_t self_in, mp_obj_t flag_in) { // Currently supports only blocking mode (void)self_in; if (!mp_obj_is_true(flag_in)) { - mp_raise_NotImplementError(""); + mp_raise_NotImplementedError(""); } return mp_const_none; } diff --git a/py/argcheck.c b/py/argcheck.c index f5edd2eda9..6da62151de 100644 --- a/py/argcheck.c +++ b/py/argcheck.c @@ -142,6 +142,6 @@ NORETURN void mp_arg_error_terse_mismatch(void) { #if MICROPY_CPYTHON_COMPAT NORETURN void mp_arg_error_unimpl_kw(void) { - mp_raise_NotImplementError("keyword argument(s) not yet implemented - use normal args instead"); + mp_raise_NotImplementedError("keyword argument(s) not yet implemented - use normal args instead"); } #endif diff --git a/py/lexer.c b/py/lexer.c index 8a3fc99853..1f0421712f 100644 --- a/py/lexer.c +++ b/py/lexer.c @@ -463,7 +463,7 @@ STATIC void mp_lexer_next_token_into(mp_lexer_t *lex, bool first_token) { // 3MB of text; even gzip-compressed and with minimal structure, it'll take // roughly half a meg of storage. This form of Unicode escape may be added // later on, but it's definitely not a priority right now. -- CJA 20140607 - mp_raise_NotImplementError("unicode name escapes"); + mp_raise_NotImplementedError("unicode name escapes"); break; default: if (c >= '0' && c <= '7') { diff --git a/py/objarray.c b/py/objarray.c index 9cac5a303c..51501ed9cc 100644 --- a/py/objarray.c +++ b/py/objarray.c @@ -292,7 +292,7 @@ STATIC mp_obj_t array_binary_op(mp_uint_t op, mp_obj_t lhs_in, mp_obj_t rhs_in) // Otherwise, can only look for a scalar numeric value in an array if (MP_OBJ_IS_INT(rhs_in) || mp_obj_is_float(rhs_in)) { - mp_raise_NotImplementError(""); + mp_raise_NotImplementedError(""); } return mp_const_false; @@ -382,7 +382,7 @@ STATIC mp_obj_t array_subscr(mp_obj_t self_in, mp_obj_t index_in, mp_obj_t value } else if (MP_OBJ_IS_TYPE(index_in, &mp_type_slice)) { mp_bound_slice_t slice; if (!mp_seq_get_fast_slice_indexes(o->len, index_in, &slice)) { - mp_raise_NotImplementError("only slices with step=1 (aka None) are supported"); + mp_raise_NotImplementedError("only slices with step=1 (aka None) are supported"); } if (value != MP_OBJ_SENTINEL) { #if MICROPY_PY_ARRAY_SLICE_ASSIGN @@ -413,7 +413,7 @@ STATIC mp_obj_t array_subscr(mp_obj_t self_in, mp_obj_t index_in, mp_obj_t value src_len = bufinfo.len; src_items = bufinfo.buf; } else { - mp_raise_NotImplementError("array/bytes required on right side"); + mp_raise_NotImplementedError("array/bytes required on right side"); } // TODO: check src/dst compat diff --git a/py/objint.c b/py/objint.c index edb2ecd873..72058a0909 100644 --- a/py/objint.c +++ b/py/objint.c @@ -380,7 +380,7 @@ STATIC mp_obj_t int_from_bytes(size_t n_args, const mp_obj_t *args) { (void)n_args; if (args[2] != MP_OBJ_NEW_QSTR(MP_QSTR_little)) { - mp_raise_NotImplementError(""); + mp_raise_NotImplementedError(""); } // get the buffer info @@ -405,7 +405,7 @@ STATIC mp_obj_t int_to_bytes(size_t n_args, const mp_obj_t *args) { (void)n_args; if (args[2] != MP_OBJ_NEW_QSTR(MP_QSTR_little)) { - mp_raise_NotImplementError(""); + mp_raise_NotImplementedError(""); } mp_uint_t len = MP_OBJ_SMALL_INT_VALUE(args[1]); diff --git a/py/objlist.c b/py/objlist.c index d25ea4ac3e..fa76d89380 100644 --- a/py/objlist.c +++ b/py/objlist.c @@ -156,7 +156,7 @@ STATIC mp_obj_t list_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) { mp_obj_list_t *self = MP_OBJ_TO_PTR(self_in); mp_bound_slice_t slice; if (!mp_seq_get_fast_slice_indexes(self->len, index, &slice)) { - mp_raise_NotImplementError(""); + mp_raise_NotImplementedError(""); } mp_int_t len_adj = slice.start - slice.stop; @@ -196,7 +196,7 @@ STATIC mp_obj_t list_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) { mp_obj_list_t *slice = MP_OBJ_TO_PTR(value); mp_bound_slice_t slice_out; if (!mp_seq_get_fast_slice_indexes(self->len, index, &slice_out)) { - mp_raise_NotImplementError(""); + mp_raise_NotImplementedError(""); } mp_int_t len_adj = slice->len - (slice_out.stop - slice_out.start); //printf("Len adj: %d\n", len_adj); diff --git a/py/objstr.c b/py/objstr.c index c34b756e51..ea4ae717e5 100644 --- a/py/objstr.c +++ b/py/objstr.c @@ -400,7 +400,7 @@ STATIC mp_obj_t bytes_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) { if (MP_OBJ_IS_TYPE(index, &mp_type_slice)) { mp_bound_slice_t slice; if (!mp_seq_get_fast_slice_indexes(self_len, index, &slice)) { - mp_raise_NotImplementError("only slices with step=1 (aka None) are supported"); + mp_raise_NotImplementedError("only slices with step=1 (aka None) are supported"); } return mp_obj_new_str_of_type(type, self_data + slice.start, slice.stop - slice.start); } @@ -609,7 +609,7 @@ STATIC mp_obj_t str_rsplit(size_t n_args, const mp_obj_t *args) { mp_int_t idx = splits; if (sep == mp_const_none) { - mp_raise_NotImplementError("rsplit(None,n)"); + mp_raise_NotImplementedError("rsplit(None,n)"); } else { mp_uint_t sep_len; const char *sep_str = mp_obj_str_get_data(sep, &sep_len); @@ -727,7 +727,7 @@ STATIC mp_obj_t str_endswith(size_t n_args, const mp_obj_t *args) { GET_STR_DATA_LEN(args[0], str, str_len); GET_STR_DATA_LEN(args[1], suffix, suffix_len); if (n_args > 2) { - mp_raise_NotImplementError("start/end indices"); + mp_raise_NotImplementedError("start/end indices"); } if (suffix_len > str_len) { @@ -1023,7 +1023,7 @@ STATIC vstr_t mp_obj_str_format_helper(const char *str, const char *top, int *ar arg = key_elem->value; } if (field_name < field_name_top) { - mp_raise_NotImplementError("attributes not supported yet"); + mp_raise_NotImplementedError("attributes not supported yet"); } } else { if (*arg_i < 0) { diff --git a/py/objstrunicode.c b/py/objstrunicode.c index b12c68e61f..e9c66e290a 100644 --- a/py/objstrunicode.c +++ b/py/objstrunicode.c @@ -188,7 +188,7 @@ STATIC mp_obj_t str_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) { mp_obj_t ostart, ostop, ostep; mp_obj_slice_get(index, &ostart, &ostop, &ostep); if (ostep != mp_const_none && ostep != MP_OBJ_NEW_SMALL_INT(1)) { - mp_raise_NotImplementError("only slices with step=1 (aka None) are supported"); + mp_raise_NotImplementedError("only slices with step=1 (aka None) are supported"); } const byte *pstart, *pstop; diff --git a/py/objtuple.c b/py/objtuple.c index 409f051abe..fdc0a23a46 100644 --- a/py/objtuple.c +++ b/py/objtuple.c @@ -181,7 +181,7 @@ mp_obj_t mp_obj_tuple_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) { if (MP_OBJ_IS_TYPE(index, &mp_type_slice)) { mp_bound_slice_t slice; if (!mp_seq_get_fast_slice_indexes(self->len, index, &slice)) { - mp_raise_NotImplementError("only slices with step=1 (aka None) are supported"); + mp_raise_NotImplementedError("only slices with step=1 (aka None) are supported"); } mp_obj_tuple_t *res = MP_OBJ_TO_PTR(mp_obj_new_tuple(slice.stop - slice.start, NULL)); mp_seq_copy(res->items, self->items + slice.start, res->len, mp_obj_t); diff --git a/py/runtime.c b/py/runtime.c index 5ebee10104..1177c60c08 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -1479,7 +1479,7 @@ NORETURN void mp_raise_RuntimeError(const char *msg) { mp_raise_msg(&mp_type_RuntimeError, msg); } -NORETURN void mp_raise_NotImplementError(const char *msg) { +NORETURN void mp_raise_NotImplementedError(const char *msg) { mp_raise_msg(&mp_type_NotImplementedError, msg); } diff --git a/py/runtime.h b/py/runtime.h index 3e62a4ac67..5ae3aaf4c2 100644 --- a/py/runtime.h +++ b/py/runtime.h @@ -142,7 +142,7 @@ NORETURN void mp_raise_TypeError(const char *msg); NORETURN void mp_raise_TypeError_varg(const char *fmt, ...); NORETURN void mp_raise_AttributeError(const char *msg); NORETURN void mp_raise_RuntimeError(const char *msg); -NORETURN void mp_raise_NotImplementError(const char *msg); +NORETURN void mp_raise_NotImplementedError(const char *msg); NORETURN void mp_raise_ImportError(const char *msg); NORETURN void mp_raise_IndexError(const char *msg); NORETURN void mp_raise_OSError(int errno_); diff --git a/unix/modjni.c b/unix/modjni.c index 99efa47873..a546c9c2cf 100644 --- a/unix/modjni.c +++ b/unix/modjni.c @@ -268,7 +268,7 @@ STATIC mp_obj_t jobject_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) return mp_const_none; } } - mp_raise_NotImplementError(""); + mp_raise_NotImplementedError(""); } if (!JJ(IsInstanceOf, self->obj, List_class)) {