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:
Damien George
2017-12-28 16:18:39 +11:00
parent 97cc485538
commit 5bf8e85fc8
5 changed files with 35 additions and 25 deletions

View File

@@ -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