summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-07-21 21:10:51 (GMT)
committerGitHub <noreply@github.com>2023-07-21 21:10:51 (GMT)
commit41ca16455188db806bfc7037058e8ecff2755e6c (patch)
tree925ab5df83f04657ea3b4be058c104556b094424 /Doc/whatsnew
parent0ba07b2108d4763273f3fb85544dde34c5acd40a (diff)
downloadcpython-41ca16455188db806bfc7037058e8ecff2755e6c.zip
cpython-41ca16455188db806bfc7037058e8ecff2755e6c.tar.gz
cpython-41ca16455188db806bfc7037058e8ecff2755e6c.tar.bz2
gh-106004: Add PyDict_GetItemRef() function (#106005)
* Add PyDict_GetItemRef() and PyDict_GetItemStringRef() functions. Add these functions to the stable ABI version 3.13. * Add unit tests on the PyDict C API in test_capi.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.13.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst
index 1d5e34d..0203e3d 100644
--- a/Doc/whatsnew/3.13.rst
+++ b/Doc/whatsnew/3.13.rst
@@ -786,6 +786,13 @@ New Features
always steals a reference to the value.
(Contributed by Serhiy Storchaka in :gh:`86493`.)
+* Added :c:func:`PyDict_GetItemRef` and :c:func:`PyDict_GetItemStringRef`
+ functions: similar to :c:func:`PyDict_GetItemWithError` but returning a
+ :term:`strong reference` instead of a :term:`borrowed reference`. Moreover,
+ these functions return -1 on error and so checking ``PyErr_Occurred()`` is
+ not needed.
+ (Contributed by Victor Stinner in :gh:`106004`.)
+
Porting to Python 3.13
----------------------