@@ -102,6 +102,23 @@ WIN32 is still required for the locale module.
102102/* #define Py_GIL_DISABLED 1 */
103103#endif
104104
105+ /* Defined in debug builds */
106+ #ifdef _DEBUG
107+ # define Py_DEBUG
108+ #endif
109+
110+ #ifdef Py_GIL_DISABLED
111+ # define _ABIFLAGS_FREETHREADED "t"
112+ #else
113+ # define _ABIFLAGS_FREETHREADED ""
114+ #endif
115+ #ifdef Py_DEBUG
116+ # define _ABIFLAGS_DEBUG "d"
117+ #else
118+ # define _ABIFLAGS_DEBUG ""
119+ #endif
120+ #define ABIFLAGS ("" _Py_STRINGIZE(_ABIFLAGS_FREETHREADED) _Py_STRINGIZE(_ABIFLAGS_DEBUG))
121+
105122/* Compiler specific defines */
106123
107124/* ------------------------------------------------------------------------*/
@@ -319,21 +336,21 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
319336 This is relevant when using build-system generator (e.g CMake) where
320337 the linking is explicitly handled */
321338# if defined(Py_GIL_DISABLED )
322- # if defined(_DEBUG )
339+ # if defined(Py_DEBUG )
323340# pragma comment(lib,"python314t_d.lib")
324341# elif defined(Py_LIMITED_API )
325342# pragma comment(lib,"python3t.lib")
326343# else
327344# pragma comment(lib,"python314t.lib")
328- # endif /* _DEBUG */
345+ # endif /* Py_DEBUG */
329346# else /* Py_GIL_DISABLED */
330- # if defined(_DEBUG )
347+ # if defined(Py_DEBUG )
331348# pragma comment(lib,"python314_d.lib")
332349# elif defined(Py_LIMITED_API )
333350# pragma comment(lib,"python3.lib")
334351# else
335352# pragma comment(lib,"python314.lib")
336- # endif /* _DEBUG */
353+ # endif /* Py_DEBUG */
337354# endif /* Py_GIL_DISABLED */
338355# endif /* _MSC_VER && !Py_NO_LINK_LIB */
339356# endif /* Py_BUILD_CORE */
@@ -376,11 +393,6 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
376393# define ALIGNOF_MAX_ALIGN_T 8
377394#endif
378395
379- #ifdef _DEBUG
380- # define Py_DEBUG
381- #endif
382-
383-
384396#ifdef MS_WIN32
385397
386398#define SIZEOF_SHORT 2
0 commit comments