◐ Shell
clean mode source ↗

gh-115119: remove TEST_COVERAGE private macro (_decimal module) by skirpichev · Pull Request #149756 · python/cpython

So, I had to reverse engineer your change...

This change no longer defines TEST_COVERAGE macro when building the _decimal extension with a Python debug build (--with-pydebug).

It seems like the TEST_COVERAGE macro was introduced by the commit 97b4121 (issue gh-94847 and PR gh-94848) to fix building the _decimal with --with-pydebug --with-lto (debug mode with LTO).

In the libmpdec-2.5.1 copy embedded in Python 3.15, I can see that the TEST_COVERAGE macro has an effect on inlining:

#if defined(_MSC_VER)
  #define ALWAYS_INLINE __forceinline
#elif defined (__IBMC__) || defined(LEGACY_COMPILER)
  #define ALWAYS_INLINE
  #undef inline
  #define inline
#else
  #ifdef TEST_COVERAGE
    #define ALWAYS_INLINE
  #else
    #define ALWAYS_INLINE inline __attribute__ ((always_inline))
  #endif
#endif

The bundled copy of the libmpdec decimal library has been removed in the main branch. So it's no longer needed to define the TEST_COVERAGE variable.