10000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e06d5b8 commit 4e57922Copy full SHA for 4e57922
Modules/_ctypes/_ctypes_test.c
@@ -1,6 +1,13 @@
1
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
2
#define Py_LIMITED_API 0x030d0000
3
4
+// gh-85283: On Windows, Py_LIMITED_API requires Py_BUILD_CORE to not attempt
5
+// linking the extension to python3.lib (which fails). Py_BUILD_CORE_MODULE is
6
+// needed to import Python symbols. Then Python.h undefines Py_BUILD_CORE and
7
+// Py_BUILD_CORE_MODULE if Py_LIMITED_API is defined.
8
+#define Py_BUILD_CORE
9
+#define Py_BUILD_CORE_MODULE
10
+
11
#include <Python.h>
12
13
#include <stdio.h> // printf()
0 commit comments