summaryrefslogtreecommitdiff
path: root/py/nlrthumb.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-12-28 16:18:39 +1100
committerDamien George <damien.p.george@gmail.com>2017-12-28 16:18:39 +1100
commit5bf8e85fc828974199d469db711aa2f9649c467b (patch)
tree114c8566cf47e5083f2a042eae1b4165bda30005 /py/nlrthumb.c
parent97cc48553828ed091325d0d3922eb4cd6c377221 (diff)
py/nlr: Clean up selection and config of NLR implementation.
If MICROPY_NLR_SETJMP is not enabled and the machine is auto-detected then nlr.h now defines some convenience macros for the individual NLR implementations to use (eg MICROPY_NLR_THUMB). This keeps nlr.h and the implementation in sync, and also makes the nlr_buf_t struct easier to read.
Diffstat (limited to 'py/nlrthumb.c')
-rw-r--r--py/nlrthumb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/nlrthumb.c b/py/nlrthumb.c
index 18d31eb70..cc081e3ff 100644
--- a/py/nlrthumb.c
+++ b/py/nlrthumb.c
@@ -26,7 +26,7 @@
#include "py/mpstate.h"
-#if (!defined(MICROPY_NLR_SETJMP) || !MICROPY_NLR_SETJMP) && (defined(__thumb2__) || defined(__thumb__) || defined(__arm__))
+#if MICROPY_NLR_THUMB
#undef nlr_push
@@ -148,4 +148,4 @@ NORETURN void nlr_jump(void *val) {
#endif
}
-#endif // (!defined(MICROPY_NLR_SETJMP) || !MICROPY_NLR_SETJMP) && (defined(__thumb2__) || defined(__thumb__) || defined(__arm__))
+#endif // MICROPY_NLR_THUMB