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

Commit2982bdb

Browse files
authored
gh-85283: Build _statistics extension with the limited C API (#116927)
Argument Clinic now inlines _PyArg_CheckPositional() for the limitedC API. The generated code should be as fast or even a little bitfaster.
1 parent0634201 commit2982bdb

File tree

4 files changed

+20
-37
lines changed

4 files changed

+20
-37
lines changed

‎Doc/whatsnew/3.13.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1482,7 +1482,8 @@ Build Changes
14821482
* The ``errno``, ``fcntl``, ``grp``, ``md5``, ``pwd``, ``resource``,
14831483
``termios``, ``winsound``,
14841484
``_ctypes_test``, ``_multiprocessing.posixshmem``, ``_scproxy``, ``_stat``,
1485-
``_testimportmultiple`` and ``_uuid`` C extensions are now built with the
1485+
``_statistics``, ``_testimportmultiple`` and ``_uuid``
1486+
C extensions are now built with the
14861487
:ref:`limited C API<limited-c-api>`.
14871488
(Contributed by Victor Stinner in:gh:`85283`.)
14881489

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
The ``fcntl``, ``grp``, ``pwd``and ``termios`` C extensions are now
1+
The ``fcntl``, ``grp``, ``pwd``, ``termios``and ``_statistics`` C extensions are now
22
built with the:ref:`limited C API<limited-c-api>`. Patch by Victor Stinner.

‎Modules/_statisticsmodule.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
/* statistics accelerator C extension: _statistics module. */
22

3-
// clinic/_statisticsmodule.c.h uses internal pycore_modsupport.h API
4-
#ifndefPy_BUILD_CORE_BUILTIN
5-
# definePy_BUILD_CORE_MODULE 1
3+
// Need limited C API version 3.12 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
4+
#include"pyconfig.h"// Py_GIL_DISABLED
5+
#ifndefPy_GIL_DISABLED
6+
# definePy_LIMITED_API 0x030c0000
67
#endif
78

89
#include"Python.h"

‎Modules/clinic/_statisticsmodule.c.h

Lines changed: 13 additions & 32 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp