From 2f0ce2a6f50ba9472ce4bd8f9fe984d830e99ade Mon Sep 17 00:00:00 2001 From: stijn Date: Wed, 26 Apr 2017 13:17:55 +0200 Subject: [PATCH] py: Cleanup use of global DEBUG preprocessor definition The standard preprocessor definition to differentiate debug and non-debug builds is NDEBUG, not DEBUG, so don't rely on the latter: - just delete the use of it in objint_longlong.c as it has been stale code for years anyway (since commit [c4029e5]): SUFFIX isn't used anywhere. - replace DEBUG with MICROPY_DEBUG_NLR in nlr.h: it is rarely used anymore so can be off by default --- py/nlr.h | 2 +- py/objint_longlong.c | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/py/nlr.h b/py/nlr.h index 00c1072fef..7a71ef34bd 100644 --- a/py/nlr.h +++ b/py/nlr.h @@ -85,7 +85,7 @@ NORETURN void nlr_jump(void *val); NORETURN void nlr_jump_fail(void *val); // use nlr_raise instead of nlr_jump so that debugging is easier -#ifndef DEBUG +#ifndef MICROPY_DEBUG_NLR #define nlr_raise(val) nlr_jump(MP_OBJ_TO_PTR(val)) #else #include "mpstate.h" diff --git a/py/objint_longlong.c b/py/objint_longlong.c index 540cfebd0a..f638a53202 100644 --- a/py/objint_longlong.c +++ b/py/objint_longlong.c @@ -40,14 +40,6 @@ #if MICROPY_LONGINT_IMPL == MICROPY_LONGINT_IMPL_LONGLONG -// Python3 no longer has "l" suffix for long ints. We allow to use it -// for debugging purpose though. -#ifdef DEBUG -#define SUFFIX "l" -#else -#define SUFFIX "" -#endif - #if MICROPY_PY_SYS_MAXSIZE // Export value for sys.maxsize const mp_obj_int_t mp_maxsize_obj = {{&mp_type_int}, MP_SSIZE_MAX};