summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/Include
diff options
context:
space:
mode:
authorshadchin <[email protected]>2026-04-11 20:54:24 +0300
committershadchin <[email protected]>2026-04-11 21:12:23 +0300
commit467f8e26f672fa7ddf8c1f74f495c376e36d302d (patch)
treeb5fe451149dda33760b2fb091a7df7a2b1cf1fda /contrib/tools/python3/Include
parentb1855ac6de8eb21270558ba8790e23fe75070d26 (diff)
Rework `pyconfig.h`
commit_hash:826de8ce55126c9f2a15bb1dcdd1227e0e069615
Diffstat (limited to 'contrib/tools/python3/Include')
-rw-r--r--contrib/tools/python3/Include/pyconfig-linux.h10
-rw-r--r--contrib/tools/python3/Include/pyconfig-osx.h10
-rw-r--r--contrib/tools/python3/Include/pyconfig-win.h8
-rw-r--r--contrib/tools/python3/Include/pyconfig.h18
4 files changed, 20 insertions, 26 deletions
diff --git a/contrib/tools/python3/Include/pyconfig-linux.h b/contrib/tools/python3/Include/pyconfig-linux.h
index 4756073fb8f..8dc6c6101e1 100644
--- a/contrib/tools/python3/Include/pyconfig-linux.h
+++ b/contrib/tools/python3/Include/pyconfig-linux.h
@@ -1692,13 +1692,7 @@
#define PY_SUPPORT_TIER 1
/* Define if you want to build an interpreter with many run-time checks. */
-#if !defined(NDEBUG) && !defined(Py_LIMITED_API) && !defined(DISABLE_PYDEBUG)
-#define Py_DEBUG
-#define GC_NDEBUG
-#define ABIFLAGS "d"
-#else
-#define ABIFLAGS ""
-#endif
+/* #undef Py_DEBUG */
/* Defined if Python is built as a shared library. */
/* #undef Py_ENABLE_SHARED */
@@ -1929,9 +1923,7 @@
/* #undef WITH_NEXT_FRAMEWORK */
/* Define if you want to compile in Python-specific mallocs */
-#ifndef address_sanitizer_enabled
#define WITH_PYMALLOC 1
-#endif
/* Define if you want pymalloc to be disabled when running under valgrind */
/* #undef WITH_VALGRIND */
diff --git a/contrib/tools/python3/Include/pyconfig-osx.h b/contrib/tools/python3/Include/pyconfig-osx.h
index 80f7aa88619..ba76e8570f4 100644
--- a/contrib/tools/python3/Include/pyconfig-osx.h
+++ b/contrib/tools/python3/Include/pyconfig-osx.h
@@ -1690,13 +1690,7 @@
#define PY_SUPPORT_TIER 1
/* Define if you want to build an interpreter with many run-time checks. */
-#if !defined(NDEBUG) && !defined(Py_LIMITED_API) && !defined(DISABLE_PYDEBUG)
-#define Py_DEBUG
-#define GC_NDEBUG
-#define ABIFLAGS "d"
-#else
-#define ABIFLAGS ""
-#endif
+/* #undef Py_DEBUG */
/* Defined if Python is built as a shared library. */
/* #undef Py_ENABLE_SHARED */
@@ -1927,9 +1921,7 @@
/* #undef WITH_NEXT_FRAMEWORK */
/* Define if you want to compile in Python-specific mallocs */
-#ifndef address_sanitizer_enabled
#define WITH_PYMALLOC 1
-#endif
/* Define if you want pymalloc to be disabled when running under valgrind */
/* #undef WITH_VALGRIND */
diff --git a/contrib/tools/python3/Include/pyconfig-win.h b/contrib/tools/python3/Include/pyconfig-win.h
index 7613a481dd6..b0c55a3beef 100644
--- a/contrib/tools/python3/Include/pyconfig-win.h
+++ b/contrib/tools/python3/Include/pyconfig-win.h
@@ -7,12 +7,4 @@
/* Define to 1 if you want to build _blake2 module with libb2 */
#define HAVE_LIBB2 1
-#if !defined(NDEBUG) && !defined(Py_LIMITED_API) && !defined(DISABLE_PYDEBUG)
-#define Py_DEBUG
-#define GC_NDEBUG
-#define ABIFLAGS "d"
-#else
-#define ABIFLAGS ""
-#endif
-
#include "../PC/pyconfig.h.in"
diff --git a/contrib/tools/python3/Include/pyconfig.h b/contrib/tools/python3/Include/pyconfig.h
index f8de6597892..d3a8647f708 100644
--- a/contrib/tools/python3/Include/pyconfig.h
+++ b/contrib/tools/python3/Include/pyconfig.h
@@ -12,6 +12,24 @@
# include "pyconfig-musl.h"
#endif
+#undef Py_DEBUG
+
+/* Define if you want to build an interpreter with many run-time checks. */
+#if !defined(NDEBUG) && !defined(Py_LIMITED_API) && !defined(DISABLE_PYDEBUG)
+#define Py_DEBUG
+#define GC_NDEBUG
+#endif
+
+#ifdef Py_DEBUG
+#define ABIFLAGS "d"
+#else
+#define ABIFLAGS ""
+#endif
+
+#ifdef address_sanitizer_enabled
+#undef WITH_PYMALLOC
+#endif
+
#if WITH_MIMALLOC
#define _mi_abandoned_await_readers _python3__mi_abandoned_await_readers