8000 gh-85283: Build _statistics extension with the limited C API by vstinner · Pull Request #116927 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-85283: Build _statistics extension with the limited C API #116927

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Doc/whatsnew/3.13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1482,7 +1482,8 @@ Build Changes
* The ``errno``, ``fcntl``, ``grp``, ``md5``, ``pwd``, ``resource``,
``termios``, ``winsound``,
``_ctypes_test``, ``_multiprocessing.posixshmem``, ``_scproxy``, ``_stat``,
``_testimportmultiple`` and ``_uuid`` C extensions are now built with the
``_statistics``, ``_testimportmultiple`` and ``_uuid``
C extensions are now built with the
:ref:`limited C API <limited-c-api>`.
(Contributed by Victor Stinner in :gh:`85283`.)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
The ``fcntl``, ``grp``, ``pwd`` and ``termios`` C extensions are now
The ``fcntl``, ``grp``, ``pwd``, ``termios`` and ``_statistics`` C extensions are now
built with the :ref:`limited C API <limited-c-api>`. Patch by Victor Stinner.
7 changes: 4 additions & 3 deletions Modules/_statisticsmodule.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/* statistics accelerator C extension: _statistics module. */

// clinic/_statisticsmodule.c.h uses internal pycore_modsupport.h API
#ifndef Py_BUILD_CORE_BUILTIN
# define Py_BUILD_CORE_MODULE 1
// Need limited C API version 3.12 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
#include "pyconfig.h" // Py_GIL_DISABLED
#ifndef Py_GIL_DISABLED
# define Py_LIMITED_API 0x030c0000
#endif

#include "Python.h"
Expand Down
45 changes: 13 additions & 32 deletions Modules/clinic/_statisticsmodule.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0