summaryrefslogtreecommitdiff
path: root/py/nlr.h
diff options
context:
space:
mode:
authorAlessandro Gatti <a.gatti@frob.it>2025-01-15 16:25:55 +0100
committerDamien George <damien@micropython.org>2025-05-13 10:36:47 +1000
commitf47e214cdcf11c2067936cb4b4e4f9deab73f6fc (patch)
tree952d3ba600015817cd445f875c3072437951528d /py/nlr.h
parent69993daa5c2eae6055f0b3b2330e95e78d6e3738 (diff)
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/nlr.h')
-rw-r--r--py/nlr.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/py/nlr.h b/py/nlr.h
index ce30bc91d..47447c5d1 100644
--- a/py/nlr.h
+++ b/py/nlr.h
@@ -177,18 +177,18 @@ unsigned int nlr_push(nlr_buf_t *);
unsigned int nlr_push_tail(nlr_buf_t *top);
void nlr_pop(void);
-NORETURN void nlr_jump(void *val);
+MP_NORETURN void nlr_jump(void *val);
#if MICROPY_ENABLE_VM_ABORT
#define nlr_set_abort(buf) MP_STATE_VM(nlr_abort) = buf
#define nlr_get_abort() MP_STATE_VM(nlr_abort)
-NORETURN void nlr_jump_abort(void);
+MP_NORETURN void nlr_jump_abort(void);
#endif
// This must be implemented by a port. It's called by nlr_jump
// if no nlr buf has been pushed. It must not return, but rather
// should bail out with a fatal error.
-NORETURN void nlr_jump_fail(void *val);
+MP_NORETURN void nlr_jump_fail(void *val);
// use nlr_raise instead of nlr_jump so that debugging is easier
#ifndef MICROPY_DEBUG_NLR