Skip to content

Commit a4646c5

Browse files
committed
Revert _DEBUG -> Py_DEBUG
1 parent f918241 commit a4646c5

5 files changed

Lines changed: 15 additions & 16 deletions

File tree

PC/launcher.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ static wchar_t * get_env(wchar_t * key)
140140
return buf;
141141
}
142142

143-
#if defined(Py_DEBUG)
143+
#if defined(_DEBUG)
144144
/* Do not define EXECUTABLEPATH_VALUE in debug builds as it'll
145145
never point to the debug build. */
146146
#if defined(_WINDOWS)

PC/pyconfig.h.in

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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

PC/python_uwp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
#include <winrt\Windows.Storage.h>
2020

2121
#ifdef PYTHONW
22-
#ifdef Py_DEBUG
22+
#ifdef _DEBUG
2323
const wchar_t *PROGNAME = L"pythonw_d.exe";
2424
#else
2525
const wchar_t *PROGNAME = L"pythonw.exe";
2626
#endif
2727
#else
28-
#ifdef Py_DEBUG
28+
#ifdef _DEBUG
2929
const wchar_t *PROGNAME = L"python_d.exe";
3030
#else
3131
const wchar_t *PROGNAME = L"python.exe";

PC/python_ver_rc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#define MS_WINDOWS
1111
#include "modsupport.h"
1212
#include "patchlevel.h"
13-
#ifdef Py_DEBUG
13+
#ifdef _DEBUG
1414
# define PYTHON_DEBUG_EXT "_d"
1515
#else
1616
# define PYTHON_DEBUG_EXT

Python/dynload_win.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ static char *GetPythonImport (HINSTANCE hModule)
108108
char *pch;
109109

110110
/* Don't claim that python3.dll is a Python DLL. */
111-
#ifdef Py_DEBUG
111+
#ifdef _DEBUG
112112
if (strcmp(import_name, "python3_d.dll") == 0) {
113113
#else
114114
if (strcmp(import_name, "python3.dll") == 0) {
@@ -120,7 +120,7 @@ static char *GetPythonImport (HINSTANCE hModule)
120120
/* Ensure python prefix is followed only
121121
by numbers to the end of the basename */
122122
pch = import_name + 6;
123-
#ifdef Py_DEBUG
123+
#ifdef _DEBUG
124124
while (*pch && pch[0] != '_' && pch[1] != 'd' && pch[2] != '.') {
125125
#else
126126
while (*pch && *pch != '.') {
@@ -300,7 +300,7 @@ dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix,
300300
char buffer[256];
301301

302302
PyOS_snprintf(buffer, sizeof(buffer),
303-
#ifdef Py_DEBUG
303+
#ifdef _DEBUG
304304
"python%d%d_d.dll",
305305
#else
306306
"python%d%d.dll",

0 commit comments

Comments
 (0)