summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-06-21 09:40:09 (GMT)
committerGitHub <noreply@github.com>2023-06-21 09:40:09 (GMT)
commit9c44656febdcf72583e192ea4530fcfb0936c309 (patch)
tree57fc76b2d09c68541c2f6da186494768d52c6502 /Misc
parent4d140e5e067d3315e163c0f1ac2f80c05ec790c6 (diff)
downloadcpython-9c44656febdcf72583e192ea4530fcfb0936c309.zip
cpython-9c44656febdcf72583e192ea4530fcfb0936c309.tar.gz
cpython-9c44656febdcf72583e192ea4530fcfb0936c309.tar.bz2
gh-105927: Add PyWeakref_GetRef() function (#105932)
Add tests on PyWeakref_NewRef(), PyWeakref_GetObject(), PyWeakref_GET_OBJECT() and PyWeakref_GetRef().
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/C API/2023-06-20-08-59-05.gh-issue-105927.DfGeEA.rst3
-rw-r--r--Misc/stable_abi.toml2
2 files changed, 5 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/C API/2023-06-20-08-59-05.gh-issue-105927.DfGeEA.rst b/Misc/NEWS.d/next/C API/2023-06-20-08-59-05.gh-issue-105927.DfGeEA.rst
new file mode 100644
index 0000000..afa40c8
--- /dev/null
+++ b/Misc/NEWS.d/next/C API/2023-06-20-08-59-05.gh-issue-105927.DfGeEA.rst
@@ -0,0 +1,3 @@
+Add :c:func:`PyWeakref_GetRef` function: similar to
+:c:func:`PyWeakref_GetObject` but returns a :term:`strong reference`, or
+``NULL`` if the referent is no longer live. Patch by Victor Stinner.
diff --git a/Misc/stable_abi.toml b/Misc/stable_abi.toml
index 7025ed4..bc7259f 100644
--- a/Misc/stable_abi.toml
+++ b/Misc/stable_abi.toml
@@ -2430,3 +2430,5 @@
added = '3.12'
[function.PyImport_AddModuleRef]
added = '3.13'
+[function.PyWeakref_GetRef]
+ added = '3.13'