8000 gh-85283: _stat extension uses the limited C API · python/cpython@07b829b · GitHub
[go: up one dir, main page]

Skip to content

Commit 07b829b

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 f83fa0b commit 07b829b

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

Doc/whatsnew/3.13.rst

Lines changed: 4 additions & 0 deletions
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
=============
Lines changed: 2 additions & 0 deletions
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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
*
1212
*/
1313

14+
#undef Py_BUILD_CORE_MODULE
15+
#undef Py_BUILD_CORE_BUILTIN
16+
17+
// Need limited C API version 3.13 for PyModule_Add() on Windows
18+
#define Py_LIMITED_API 0x030d0000
19+
1420
#include "Python.h"
1521

1622
#ifdef HAVE_SYS_TYPES_H

0 commit comments

Comments
 (0)
0