@@ -94,6 +94,11 @@ WIN32 is still required for the locale module.
9494#endif
9595#endif /* Py_BUILD_CORE || Py_BUILD_CORE_BUILTIN || Py_BUILD_CORE_MODULE */
9696
97+ /* _DEBUG implies Py_DEBUG */
98+ #ifdef _DEBUG
99+ # define Py_DEBUG 1
100+ #endif
101+
97102/* Define to 1 if you want to disable the GIL */
98103/* Uncomment the definition for free-threaded builds, or define it manually
99104 * when compiling extension modules. Note that we test with #ifdef, so
@@ -319,21 +324,21 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
319324 This is relevant when using build-system generator (e.g CMake) where
320325 the linking is explicitly handled */
321326# if defined(Py_GIL_DISABLED )
322- # if defined(_DEBUG )
327+ # if defined(Py_DEBUG )
323328# pragma comment(lib,"python315t_d.lib")
324329# elif defined(Py_LIMITED_API )
325330# pragma comment(lib,"python3t.lib")
326331# else
327332# pragma comment(lib,"python315t.lib")
328- # endif /* _DEBUG */
333+ # endif /* Py_DEBUG */
329334# else /* Py_GIL_DISABLED */
330- # if defined(_DEBUG )
335+ # if defined(Py_DEBUG )
331336# pragma comment(lib,"python315_d.lib")
332337# elif defined(Py_LIMITED_API )
333338# pragma comment(lib,"python3.lib")
334339# else
335340# pragma comment(lib,"python315.lib")
336- # endif /* _DEBUG */
341+ # endif /* Py_DEBUG */
337342# endif /* Py_GIL_DISABLED */
338343# endif /* _MSC_VER && !Py_NO_LINK_LIB */
339344# endif /* Py_BUILD_CORE */
@@ -376,11 +381,6 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
376381# define ALIGNOF_MAX_ALIGN_T 8
377382#endif
378383
379- #ifdef _DEBUG
380- # define Py_DEBUG
381- #endif
382-
383-
384384#ifdef MS_WIN32
385385
386386#define SIZEOF_SHORT 2
0 commit comments