Skip to content
Snippets Groups Projects
Commit 803264bb authored by stijn's avatar stijn Committed by Damien George
Browse files

py: Guard against redef of nlr_push with DEBUG + MICROPY_NLR_SETJMP.

parent 9be0d599
No related branches found
No related tags found
No related merge requests found
...@@ -99,6 +99,7 @@ void nlr_jump_fail(void *val); ...@@ -99,6 +99,7 @@ void nlr_jump_fail(void *val);
nlr_jump(_val); \ nlr_jump(_val); \
} while (0) } while (0)
#if !MICROPY_NLR_SETJMP
#define nlr_push(val) \ #define nlr_push(val) \
assert(MP_STATE_VM(nlr_top) != val),nlr_push(val) assert(MP_STATE_VM(nlr_top) != val),nlr_push(val)
...@@ -107,6 +108,7 @@ void nlr_jump_fail(void *val); ...@@ -107,6 +108,7 @@ void nlr_jump_fail(void *val);
printf("nlr_push: before: nlr_top=%p, val=%p\n", MP_STATE_VM(nlr_top), val),assert(MP_STATE_VM(nlr_top) != val),nlr_push(val) printf("nlr_push: before: nlr_top=%p, val=%p\n", MP_STATE_VM(nlr_top), val),assert(MP_STATE_VM(nlr_top) != val),nlr_push(val)
#endif #endif
*/ */
#endif
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment