aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/PC
diff options
context:
space:
mode:
Diffstat (limited to 'PC')
-rw-r--r--PC/launcher.c2
-rw-r--r--PC/pyconfig.h.in18
-rw-r--r--PC/python_uwp.cpp4
-rw-r--r--PC/python_ver_rc.h2
4 files changed, 13 insertions, 13 deletions
diff --git a/PC/launcher.c b/PC/launcher.c
index 5c63d872bd4..fed5e156b92 100644
--- a/PC/launcher.c
+++ b/PC/launcher.c
@@ -140,7 +140,7 @@ static wchar_t * get_env(wchar_t * key)
return buf;
}
-#if defined(_DEBUG)
+#if defined(Py_DEBUG)
/* Do not define EXECUTABLEPATH_VALUE in debug builds as it'll
never point to the debug build. */
#if defined(_WINDOWS)
diff --git a/PC/pyconfig.h.in b/PC/pyconfig.h.in
index bbafaed808e..1d659e7cee6 100644
--- a/PC/pyconfig.h.in
+++ b/PC/pyconfig.h.in
@@ -94,6 +94,11 @@ WIN32 is still required for the locale module.
#endif
#endif /* Py_BUILD_CORE || Py_BUILD_CORE_BUILTIN || Py_BUILD_CORE_MODULE */
+/* _DEBUG implies Py_DEBUG */
+#ifdef _DEBUG
+# define Py_DEBUG 1
+#endif
+
/* Define to 1 if you want to disable the GIL */
/* Uncomment the definition for free-threaded builds, or define it manually
* 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 */
This is relevant when using build-system generator (e.g CMake) where
the linking is explicitly handled */
# if defined(Py_GIL_DISABLED)
-# if defined(_DEBUG)
+# if defined(Py_DEBUG)
# pragma comment(lib,"python315t_d.lib")
# elif defined(Py_LIMITED_API)
# pragma comment(lib,"python3t.lib")
# else
# pragma comment(lib,"python315t.lib")
-# endif /* _DEBUG */
+# endif /* Py_DEBUG */
# else /* Py_GIL_DISABLED */
-# if defined(_DEBUG)
+# if defined(Py_DEBUG)
# pragma comment(lib,"python315_d.lib")
# elif defined(Py_LIMITED_API)
# pragma comment(lib,"python3.lib")
# else
# pragma comment(lib,"python315.lib")
-# endif /* _DEBUG */
+# endif /* Py_DEBUG */
# endif /* Py_GIL_DISABLED */
# endif /* _MSC_VER && !Py_NO_LINK_LIB */
# endif /* Py_BUILD_CORE */
@@ -376,11 +381,6 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
# define ALIGNOF_MAX_ALIGN_T 8
#endif
-#ifdef _DEBUG
-# define Py_DEBUG
-#endif
-
-
#ifdef MS_WIN32
#define SIZEOF_SHORT 2
diff --git a/PC/python_uwp.cpp b/PC/python_uwp.cpp
index b9c408a580c..8cdb8d722cd 100644
--- a/PC/python_uwp.cpp
+++ b/PC/python_uwp.cpp
@@ -19,13 +19,13 @@
#include <winrt\Windows.Storage.h>
#ifdef PYTHONW
-#ifdef _DEBUG
+#ifdef Py_DEBUG
const wchar_t *PROGNAME = L"pythonw_d.exe";
#else
const wchar_t *PROGNAME = L"pythonw.exe";
#endif
#else
-#ifdef _DEBUG
+#ifdef Py_DEBUG
const wchar_t *PROGNAME = L"python_d.exe";
#else
const wchar_t *PROGNAME = L"python.exe";
diff --git a/PC/python_ver_rc.h b/PC/python_ver_rc.h
index ee867fe4122..bb98144cd03 100644
--- a/PC/python_ver_rc.h
+++ b/PC/python_ver_rc.h
@@ -10,7 +10,7 @@
#define MS_WINDOWS
#include "modsupport.h"
#include "patchlevel.h"
-#ifdef _DEBUG
+#ifdef Py_DEBUG
# define PYTHON_DEBUG_EXT "_d"
#else
# define PYTHON_DEBUG_EXT