@@ -102,11 +102,6 @@ WIN32 is still required for the locale module.
102102/* #define Py_GIL_DISABLED 1 */
103103#endif
104104
105- // _DEBUG implies Py_DEBUG
106- #ifdef _DEBUG
107- #define Py_DEBUG
108- #endif
109-
110105/* Compiler specific defines */
111106
112107/* ------------------------------------------------------------------------*/
@@ -324,21 +319,21 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
324319 This is relevant when using build-system generator (e.g CMake) where
325320 the linking is explicitly handled */
326321# if defined(Py_GIL_DISABLED )
327- # if defined(Py_DEBUG )
322+ # if defined(_DEBUG )
328323# pragma comment(lib,"python314t_d.lib")
329324# elif defined(Py_LIMITED_API )
330325# pragma comment(lib,"python3t.lib")
331326# else
332327# pragma comment(lib,"python314t.lib")
333- # endif /* Py_DEBUG */
328+ # endif /* _DEBUG */
334329# else /* Py_GIL_DISABLED */
335- # if defined(Py_DEBUG )
330+ # if defined(_DEBUG )
336331# pragma comment(lib,"python314_d.lib")
337332# elif defined(Py_LIMITED_API )
338333# pragma comment(lib,"python3.lib")
339334# else
340335# pragma comment(lib,"python314.lib")
341- # endif /* Py_DEBUG */
336+ # endif /* _DEBUG */
342337# endif /* Py_GIL_DISABLED */
343338# endif /* _MSC_VER && !Py_NO_LINK_LIB */
344339# endif /* Py_BUILD_CORE */
@@ -381,6 +376,10 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
381376# define ALIGNOF_MAX_ALIGN_T 8
382377#endif
383378
379+ #ifdef _DEBUG
380+ # define Py_DEBUG
381+ #endif
382+
384383
385384#ifdef MS_WIN32
386385
0 commit comments