FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-85283: Build _testimportmultiple with limited C API by vstinner · Pull Request #110954 · python/cpython · GitHub

/ cpython Public
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .c  (1) .rst  (2) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
4 changes: 2 additions & 2 deletions Doc/whatsnew/3.13.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -932,8 +932,8 @@ Build Changes
* Building CPython now requires a compiler with support for the C11 atomic
library, GCC built-in atomic functions, or MSVC interlocked intrinsics.

* The ``_stat`` C extension is now built with the :ref:`limited C API
<limited-c-api>`.
* The ``_stat`` and ``_testimportmultiple`` C extensions are now built with the
:ref:`limited C API <limited-c-api>`.
(Contributed by Victor Stinner in :gh:`85283`.)


Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The ``_testimportmultiple`` C extension is now built with the :ref:`limited
C API <limited-c-api>`. Patch by Victor Stinner.
6 changes: 4 additions & 2 deletions Modules/_testimportmultiple.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -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<Python.h>

#define Py_LIMITED_API 0x030d0000

#include <Python.h>

static struct PyModuleDef _testimportmultiple = {
PyModuleDef_HEAD_INIT,
Expand Down Expand Up @@ -54,4 +57,3 @@ static struct PyModuleDef _barmodule = {
PyMODINIT_FUNC PyInit__testimportmultiple_bar(void){
return PyModule_Create(&_barmodule);
}


Back | FazBrowse Home | New Git URL