Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2ba6f68

Browse files
authored
gh-85283: Fix _ctypes_test build on Windows in release mode (#111005)
Define Py_BUILD_CORE to not attempt to link the extension topython3.lib (which fails).
1 parent0f9d0fb commit2ba6f68

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

‎Modules/_ctypes/_ctypes_test.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
22
#definePy_LIMITED_API 0x030d0000
33

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+
#definePy_BUILD_CORE
9+
#definePy_BUILD_CORE_MODULE
10+
411
#include<Python.h>
512

613
#include<stdio.h>// printf()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp