From cd1d6d259ddd7b943f751fa5b3eb8d2b2ad64ec0 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sat, 26 Aug 2023 04:06:54 +0200 Subject: [PATCH] gh-85283: _uuid uses the limited C API The _uuid C extension is now built with the limited C API. --- .../next/C API/2023-08-26-04-07-37.gh-issue-85283.TKX77g.rst | 2 ++ Modules/_uuidmodule.c | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 Misc/NEWS.d/next/C API/2023-08-26-04-07-37.gh-issue-85283.TKX77g.rst diff --git a/Misc/NEWS.d/next/C API/2023-08-26-04-07-37.gh-issue-85283.TKX77g.rst b/Misc/NEWS.d/next/C API/2023-08-26-04-07-37.gh-issue-85283.TKX77g.rst new file mode 100644 index 00000000000000..c0a33a0e8be3c8 --- /dev/null +++ b/Misc/NEWS.d/next/C API/2023-08-26-04-07-37.gh-issue-85283.TKX77g.rst @@ -0,0 +1,2 @@ +The ``_uuid`` C extension is now built with the :ref:`limited C API +`. Patch by Victor Stinner. diff --git a/Modules/_uuidmodule.c b/Modules/_uuidmodule.c index 2f5be1c5144d83..c6d62ad12372cc 100644 --- a/Modules/_uuidmodule.c +++ b/Modules/_uuidmodule.c @@ -3,6 +3,8 @@ * DCE compatible Universally Unique Identifier library. */ +#define Py_LIMITED_API 0x030d0000 + #include "Python.h" #if defined(HAVE_UUID_H) // AIX, FreeBSD, libuuid with pkgconf