diff options
author | Victor Stinner <vstinner@python.org> | 2023-06-20 06:48:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-20 06:48:14 (GMT) |
commit | 03f1a132eeb34c738812161947ef171b21d58c25 (patch) | |
tree | efb632b4c885e58425bfd563c92137ef60f7d72d /Doc/whatsnew | |
parent | 7f97c8e367869e2aebe9f28bc5f8d4ce36448878 (diff) | |
download | cpython-03f1a132eeb34c738812161947ef171b21d58c25.zip cpython-03f1a132eeb34c738812161947ef171b21d58c25.tar.gz cpython-03f1a132eeb34c738812161947ef171b21d58c25.tar.bz2 |
gh-105922: Add PyImport_AddModuleRef() function (#105923)
* Add tests on PyImport_AddModuleRef(), PyImport_AddModule() and
PyImport_AddModuleObject().
* pythonrun.c: Replace Py_XNewRef(PyImport_AddModule(name)) with
PyImport_AddModuleRef(name).
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/3.13.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst index 735715f..bbe02a9 100644 --- a/Doc/whatsnew/3.13.rst +++ b/Doc/whatsnew/3.13.rst @@ -426,6 +426,11 @@ New Features APIs accepting the format codes always use ``Py_ssize_t`` for ``#`` formats. (Contributed by Inada Naoki in :gh:`104922`.) +* Add :c:func:`PyImport_AddModuleRef`: similar to + :c:func:`PyImport_AddModule`, but return a :term:`strong reference` instead + of a :term:`borrowed reference`. + (Contributed by Victor Stinner in :gh:`105922`.) + Porting to Python 3.13 ---------------------- |