@@ -289,6 +289,11 @@ typedef int pid_t;
289289# include <stdio.h>
290290#endif
291291
292+ // _DEBUG implies Py_DEBUG
293+ #ifdef _DEBUG
294+ # define Py_DEBUG
295+ #endif
296+
292297/* 64 bit ints are usually spelt __int64 unless compiler has overridden */
293298#ifndef PY_LONG_LONG
294299# define PY_LONG_LONG __int64
@@ -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,"python314t_d.lib")
324329# elif defined(Py_LIMITED_API )
325330# pragma comment(lib,"python3t.lib")
326331# else
327332# pragma comment(lib,"python314t.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,"python314_d.lib")
332337# elif defined(Py_LIMITED_API )
333338# pragma comment(lib,"python3.lib")
334339# else
335340# pragma comment(lib,"python314.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,10 +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-
383384
384385#ifdef MS_WIN32
385386
0 commit comments