Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4c4917d

Browse files
committed
gh-85283: Build fcntl extension with the limited C API
1 parent d402872 commit 4c4917d

File tree

4 files changed

+41
-20
lines changed

4 files changed

+41
-20
lines changed

Doc/whatsnew/3.13.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1460,8 +1460,8 @@ Build Changes
14601460
* Building CPython now requires a compiler with support for the C11 atomic
14611461
library, GCC built-in atomic functions, or MSVC interlocked intrinsics.
14621462

1463-
* The ``errno``, ``md5``, ``resource``, ``winsound``, ``_ctypes_test``,
1464-
``_multiprocessing.posixshmem``, ``_scproxy``, ``_stat``,
1463+
* The ``errno``, ``fcntl``, ``grp``, ``md5``, ``resource``, ``winsound``,
1464+
``_ctypes_test``, ``_multiprocessing.posixshmem``, ``_scproxy``, ``_stat``,
14651465
``_testimportmultiple`` and ``_uuid`` C extensions are now built with the
14661466
:ref:`limited C API <limited-c-api>`.
14671467
(Contributed by Victor Stinner in :gh:`85283`.)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The ``fcntl`` and ``grp`` C extensions are now built with the :ref:`limited
2+
C API <limited-c-api>`. (Contributed by Victor Stinner in :gh:`85283`.)

Modules/clinic/fcntlmodule.c.h

+33-16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Modules/fcntlmodule.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
/* fcntl module */
22

3-
#ifndef Py_BUILD_CORE_BUILTIN
4-
# define Py_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+
#ifndef Py_GIL_DISABLED
6+
# define Py_LIMITED_API 0x030c0000
57
#endif
68

79
#include "Python.h"

0 commit comments

Comments
 (0)