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

Commitcf9c25c

Browse files
authored
gh-85283: Build _testimportmultiple with limited C API (#110954)
1 parent86559dd commitcf9c25c

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

‎Doc/whatsnew/3.13.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -932,8 +932,8 @@ Build Changes
932932
* Building CPython now requires a compiler with support for the C11 atomic
933933
library, GCC built-in atomic functions, or MSVC interlocked intrinsics.
934934

935-
* The ``_stat``C extension is now built with the:ref:`limited C API
936-
<limited-c-api>`.
935+
* The ``_stat``and ``_testimportmultiple`` C extensions are now built with the
936+
:ref:`limited C API<limited-c-api>`.
937937
(Contributed by Victor Stinner in:gh:`85283`.)
938938

939939

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The ``_testimportmultiple`` C extension is now built with the:ref:`limited
2+
C API <limited-c-api>`. Patch by Victor Stinner.

‎Modules/_testimportmultiple.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
* file (issue16421). This file defines 3 modules (_testimportmodule,
44
* foo, bar), only the first one is called the same as the compiled file.
55
*/
6-
#include<Python.h>
6+
7+
#definePy_LIMITED_API 0x030d0000
8+
9+
#include<Python.h>
710

811
staticstructPyModuleDef_testimportmultiple= {
912
PyModuleDef_HEAD_INIT,
@@ -54,4 +57,3 @@ static struct PyModuleDef _barmodule = {
5457
PyMODINIT_FUNCPyInit__testimportmultiple_bar(void){
5558
returnPyModule_Create(&_barmodule);
5659
}
57-

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp