summaryrefslogtreecommitdiffstats
path: root/PC/pyconfig.h.in
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@python.org>2024-02-26 19:14:14 (GMT)
committerGitHub <noreply@github.com>2024-02-26 19:14:14 (GMT)
commit37a13b941394a1337576c67bff35d4a44a1157e2 (patch)
tree226b0d2647c251a3ccb12fe2e3b25de476929dc5 /PC/pyconfig.h.in
parent72cff8d8e5a476d3406efb0491452bf9d6b02feb (diff)
downloadcpython-37a13b941394a1337576c67bff35d4a44a1157e2.zip
cpython-37a13b941394a1337576c67bff35d4a44a1157e2.tar.gz
cpython-37a13b941394a1337576c67bff35d4a44a1157e2.tar.bz2
gh-115582: Make default PC/pyconfig.h work for free-threaded builds with manual /DPy_GIL_DISABLED (GH-115850)
Diffstat (limited to 'PC/pyconfig.h.in')
-rw-r--r--PC/pyconfig.h.in7
1 files changed, 6 insertions, 1 deletions
diff --git a/PC/pyconfig.h.in b/PC/pyconfig.h.in
index 8bbf877..d72d628 100644
--- a/PC/pyconfig.h.in
+++ b/PC/pyconfig.h.in
@@ -95,7 +95,12 @@ WIN32 is still required for the locale module.
#endif /* Py_BUILD_CORE || Py_BUILD_CORE_BUILTIN || Py_BUILD_CORE_MODULE */
/* Define to 1 if you want to disable the GIL */
-#undef Py_GIL_DISABLED
+/* Uncomment the definition for free-threaded builds, or define it manually
+ * when compiling extension modules. Note that we test with #ifdef, so
+ * defining as 0 will still disable the GIL. */
+#ifndef Py_GIL_DISABLED
+/* #define Py_GIL_DISABLED 1 */
+#endif
/* Compiler specific defines */