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.
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
|
||||
#include "py/mpstate.h"
|
||||
|
||||
#if !MICROPY_NLR_SETJMP && defined(__i386__)
|
||||
#if MICROPY_NLR_X86
|
||||
|
||||
#undef nlr_push
|
||||
|
||||
@@ -114,4 +114,4 @@ NORETURN void nlr_jump(void *val) {
|
||||
for (;;); // needed to silence compiler warning
|
||||
}
|
||||
|
||||
#endif // !MICROPY_NLR_SETJMP && defined(__i386__)
|
||||
#endif // MICROPY_NLR_X86
|
||||
|
||||
Reference in New Issue
Block a user