diff --git a/Misc/NEWS.d/next/C API/2023-08-26-02-11-01.gh-issue-85283.RzMWia.rst b/Misc/NEWS.d/next/C API/2023-08-26-02-11-01.gh-issue-85283.RzMWia.rst new file mode 100644 index 00000000000000..dc177bcf508e6e --- /dev/null +++ b/Misc/NEWS.d/next/C API/2023-08-26-02-11-01.gh-issue-85283.RzMWia.rst @@ -0,0 +1,2 @@ +The ``_testimportmultiple`` C extension is now built with the :ref:`limited C +API `. Patch by Victor Stinner. diff --git a/Modules/_testimportmultiple.c b/Modules/_testimportmultiple.c index 1caeb66eb8c858..7a24146cb55ba9 100644 --- a/Modules/_testimportmultiple.c +++ b/Modules/_testimportmultiple.c @@ -3,7 +3,10 @@ * file (issue16421). This file defines 3 modules (_testimportmodule, * foo, bar), only the first one is called the same as the compiled file. */ -#include + +#define Py_LIMITED_API 0x030d0000 + +#include static struct PyModuleDef _testimportmultiple = { PyModuleDef_HEAD_INIT,