Skip to content

Commit 022ef91

Browse files
vstinnerGlyphack
authored andcommitted
pythongh-85283: _stat extension now uses the limited C API (python#110711)
pythongh-85283: _stat extension uses the limited C API The _stat C extension is now built with the limited C API.
1 parent 6fc23bf commit 022ef91

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

Doc/whatsnew/3.13.rst

+4
Original file line numberDiff line numberDiff line change
@@ -928,6 +928,10 @@ Build Changes
928928
* Building CPython now requires a compiler with support for the C11 atomic
929929
library, GCC built-in atomic functions, or MSVC interlocked intrinsics.
930930

931+
* The ``_stat`` C extension is now built with the :ref:`limited C API
932+
<limited-c-api>`.
933+
(Contributed by Victor Stinner in :gh:`85283`.)
934+
931935

932936
C API Changes
933937
=============
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The ``_stat`` C extension is now built with the :ref:`limited C API
2+
<limited-c-api>`. Patch by Victor Stinner.

Modules/_stat.c

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
*
1212
*/
1313

14+
// Need limited C API version 3.13 for PyModule_Add() on Windows
15+
#define Py_LIMITED_API 0x030d0000
16+
1417
#include "Python.h"
1518

1619
#ifdef HAVE_SYS_TYPES_H

0 commit comments

Comments
 (0)