From e06a69a24618a38f0dd727d9b5334cc223fa352b Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sat, 26 Aug 2023 18:19:16 +0200 Subject: [PATCH] gh-85283: _stat extension uses the limited C API The _stat C extension is now built with the limited C API. --- .../next/C API/2023-08-28-18-03-42.gh-issue-85283.Gry44b.rst | 2 ++ Modules/_stat.c | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 Misc/NEWS.d/next/C API/2023-08-28-18-03-42.gh-issue-85283.Gry44b.rst diff --git a/Misc/NEWS.d/next/C API/2023-08-28-18-03-42.gh-issue-85283.Gry44b.rst b/Misc/NEWS.d/next/C API/2023-08-28-18-03-42.gh-issue-85283.Gry44b.rst new file mode 100644 index 000000000000000..352f95de183ffc6 --- /dev/null +++ b/Misc/NEWS.d/next/C API/2023-08-28-18-03-42.gh-issue-85283.Gry44b.rst @@ -0,0 +1,2 @@ +The ``_stat`` C extension is now built with the :ref:`limited C API ++`. Patch by Victor Stinner. diff --git a/Modules/_stat.c b/Modules/_stat.c index 6cea26175dee5e7..8e2f53eb4a491c0 100644 --- a/Modules/_stat.c +++ b/Modules/_stat.c @@ -11,6 +11,8 @@ * */ +#define Py_LIMITED_API 0x030d0000 + #include "Python.h" #ifdef __cplusplus