summaryrefslogtreecommitdiffstats
path: root/Modules/_ctypes
diff options
context:
space:
mode:
authorSam Gross <colesbury@gmail.com>2023-10-30 16:06:09 (GMT)
committerGitHub <noreply@github.com>2023-10-30 16:06:09 (GMT)
commit6dfb8fe0236718e9afc8136ff2b58dcfbc182022 (patch)
tree1b5ad337bc68ebc2ff1325c0b695807c48640d30 /Modules/_ctypes
parent05f2f0ac92afa560315eb66fd6576683c7f69e2d (diff)
downloadcpython-6dfb8fe0236718e9afc8136ff2b58dcfbc182022.zip
cpython-6dfb8fe0236718e9afc8136ff2b58dcfbc182022.tar.gz
cpython-6dfb8fe0236718e9afc8136ff2b58dcfbc182022.tar.bz2
gh-110481: Implement biased reference counting (gh-110764)
Diffstat (limited to 'Modules/_ctypes')
-rw-r--r--Modules/_ctypes/_ctypes_test.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/_ctypes/_ctypes_test.c b/Modules/_ctypes/_ctypes_test.c
index df11c00..12d372f 100644
--- a/Modules/_ctypes/_ctypes_test.c
+++ b/Modules/_ctypes/_ctypes_test.c
@@ -1,5 +1,11 @@
+#ifndef _MSC_VER
+#include "pyconfig.h" // Py_NOGIL
+#endif
+
+#ifndef Py_NOGIL
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
#define Py_LIMITED_API 0x030d0000
+#endif
// gh-85283: On Windows, Py_LIMITED_API requires Py_BUILD_CORE to not attempt
// linking the extension to python3.lib (which fails). Py_BUILD_CORE_MODULE is