mirror of https://github.com/python/cpython
gh-85283: Build _testimportmultiple with limited C API (#110954)
This commit is contained in:
parent
86559ddfec
commit
cf9c25c719
|
@ -932,8 +932,8 @@ Build Changes
|
||||||
* Building CPython now requires a compiler with support for the C11 atomic
|
* Building CPython now requires a compiler with support for the C11 atomic
|
||||||
library, GCC built-in atomic functions, or MSVC interlocked intrinsics.
|
library, GCC built-in atomic functions, or MSVC interlocked intrinsics.
|
||||||
|
|
||||||
* The ``_stat`` C extension is now built with the :ref:`limited C API
|
* The ``_stat`` and ``_testimportmultiple`` C extensions are now built with the
|
||||||
<limited-c-api>`.
|
:ref:`limited C API <limited-c-api>`.
|
||||||
(Contributed by Victor Stinner in :gh:`85283`.)
|
(Contributed by Victor Stinner in :gh:`85283`.)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
The ``_testimportmultiple`` C extension is now built with the :ref:`limited
|
||||||
|
C API <limited-c-api>`. Patch by Victor Stinner.
|
|
@ -3,7 +3,10 @@
|
||||||
* file (issue16421). This file defines 3 modules (_testimportmodule,
|
* file (issue16421). This file defines 3 modules (_testimportmodule,
|
||||||
* foo, bar), only the first one is called the same as the compiled file.
|
* foo, bar), only the first one is called the same as the compiled file.
|
||||||
*/
|
*/
|
||||||
#include<Python.h>
|
|
||||||
|
#define Py_LIMITED_API 0x030d0000
|
||||||
|
|
||||||
|
#include <Python.h>
|
||||||
|
|
||||||
static struct PyModuleDef _testimportmultiple = {
|
static struct PyModuleDef _testimportmultiple = {
|
||||||
PyModuleDef_HEAD_INIT,
|
PyModuleDef_HEAD_INIT,
|
||||||
|
@ -54,4 +57,3 @@ static struct PyModuleDef _barmodule = {
|
||||||
PyMODINIT_FUNC PyInit__testimportmultiple_bar(void){
|
PyMODINIT_FUNC PyInit__testimportmultiple_bar(void){
|
||||||
return PyModule_Create(&_barmodule);
|
return PyModule_Create(&_barmodule);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue