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

Skip to content

Commit 12b7a8e

Browse files
committed
gh-85283: _stat extension uses the limited C API
The _stat C extension is now built with the limited C API.
1 parent 13a0007 commit 12b7a8e

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

Doc/whatsnew/3.13.rst

+4
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,10 @@ Build Changes
833833
:ref:`debug build <debug-build>`.
834834
(Contributed by Victor Stinner in :gh:`108634`.)
835835

836+
* The ``_stat`` C extension is now built with the :ref:`limited C API
837+
<limited-c-api>`.
838+
(Contributed by Victor Stinner in :gh:`85283`.)
839+
836840

837841
C API Changes
838842
=============
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-1
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
* as int 0.
99
*
1010
* NOTE: POSIX only defines the values of the S_I* permission bits.
11-
*
1211
*/
1312

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

1618
#ifdef __cplusplus

0 commit comments

Comments
 (0)