diff options
author | Alessandro Gatti <a.gatti@frob.it> | 2025-01-15 16:25:55 +0100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2025-05-13 10:36:47 +1000 |
commit | f47e214cdcf11c2067936cb4b4e4f9deab73f6fc (patch) | |
tree | 952d3ba600015817cd445f875c3072437951528d /py/dynruntime.h | |
parent | 69993daa5c2eae6055f0b3b2330e95e78d6e3738 (diff) | |
download | micropython-f47e214cdcf11c2067936cb4b4e4f9deab73f6fc.tar.gz micropython-f47e214cdcf11c2067936cb4b4e4f9deab73f6fc.zip |
all: Rename the "NORETURN" macro to "MP_NORETURN".
This commit renames the NORETURN macro, indicating to the compiler
that a function does not return, into MP_NORETURN to maintain the same
naming convention of other similar macros.
To maintain compaitiblity with existing code NORETURN is aliased to
MP_NORETURN, but it is also deprecated for MicroPython v2.
This changeset was created using a similar process to
decf8e6a8bb940d5829ca3296790631fcece7b21 ("all: Remove the "STATIC"
macro and just use "static" instead."), with no documentation or python
scripts to change to reflect the new macro name.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
Diffstat (limited to 'py/dynruntime.h')
-rw-r--r-- | py/dynruntime.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/py/dynruntime.h b/py/dynruntime.h index c93111bbd4..0e438da4b7 100644 --- a/py/dynruntime.h +++ b/py/dynruntime.h @@ -70,7 +70,7 @@ #define m_realloc(ptr, new_num_bytes) (m_realloc_dyn((ptr), (new_num_bytes))) #define m_realloc_maybe(ptr, new_num_bytes, allow_move) (m_realloc_maybe_dyn((ptr), (new_num_bytes), (allow_move))) -static NORETURN inline void m_malloc_fail_dyn(size_t num_bytes) { +static MP_NORETURN inline void m_malloc_fail_dyn(size_t num_bytes) { mp_fun_table.raise_msg( mp_fun_table.load_global(MP_QSTR_MemoryError), "memory allocation failed"); @@ -295,7 +295,7 @@ static inline mp_obj_t mp_obj_new_exception_arg1_dyn(const mp_obj_type_t *exc_ty return mp_call_function_n_kw(MP_OBJ_FROM_PTR(exc_type), 1, 0, &args[0]); } -static NORETURN inline void mp_raise_dyn(mp_obj_t o) { +static MP_NORETURN inline void mp_raise_dyn(mp_obj_t o) { mp_fun_table.raise(o); for (;;) { } |