Skip to content
Snippets Groups Projects
Commit 2f0ce2a6 authored by stijn's avatar stijn Committed by Paul Sokolovsky
Browse files

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 [c4029e50]): 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
parent a7f50225
No related branches found
No related tags found
No related merge requests found
...@@ -85,7 +85,7 @@ NORETURN void nlr_jump(void *val); ...@@ -85,7 +85,7 @@ NORETURN void nlr_jump(void *val);
NORETURN void nlr_jump_fail(void *val); NORETURN void nlr_jump_fail(void *val);
// use nlr_raise instead of nlr_jump so that debugging is easier // 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)) #define nlr_raise(val) nlr_jump(MP_OBJ_TO_PTR(val))
#else #else
#include "mpstate.h" #include "mpstate.h"
......
...@@ -40,14 +40,6 @@ ...@@ -40,14 +40,6 @@
#if MICROPY_LONGINT_IMPL == MICROPY_LONGINT_IMPL_LONGLONG #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 #if MICROPY_PY_SYS_MAXSIZE
// Export value for sys.maxsize // Export value for sys.maxsize
const mp_obj_int_t mp_maxsize_obj = {{&mp_type_int}, MP_SSIZE_MAX}; const mp_obj_int_t mp_maxsize_obj = {{&mp_type_int}, MP_SSIZE_MAX};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment