diff options
author | Victor Stinner <vstinner@python.org> | 2023-10-03 16:53:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-03 16:53:51 (GMT) |
commit | d73501602f863a54c872ce103cd3fa119e38bac9 (patch) | |
tree | df6d23aa36d385215bb03f22fe0aacf625bbdf1e /Misc/NEWS.d/next/C API | |
parent | 6ab6040054e5ca2d3eb7833dc8bf4eb0bbaa0aac (diff) | |
download | cpython-d73501602f863a54c872ce103cd3fa119e38bac9.zip cpython-d73501602f863a54c872ce103cd3fa119e38bac9.tar.gz cpython-d73501602f863a54c872ce103cd3fa119e38bac9.tar.bz2 |
gh-108867: Add PyThreadState_GetUnchecked() function (#108870)
Add PyThreadState_GetUnchecked() function: similar to
PyThreadState_Get(), but don't issue a fatal error if it is NULL. The
caller is responsible to check if the result is NULL. Previously,
this function was private and known as _PyThreadState_UncheckedGet().
Diffstat (limited to 'Misc/NEWS.d/next/C API')
-rw-r--r-- | Misc/NEWS.d/next/C API/2023-09-04-11-47-12.gh-issue-108867.Cr_LKd.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/C API/2023-09-04-11-47-12.gh-issue-108867.Cr_LKd.rst b/Misc/NEWS.d/next/C API/2023-09-04-11-47-12.gh-issue-108867.Cr_LKd.rst new file mode 100644 index 0000000..2f56466 --- /dev/null +++ b/Misc/NEWS.d/next/C API/2023-09-04-11-47-12.gh-issue-108867.Cr_LKd.rst @@ -0,0 +1,5 @@ +Add :c:func:`PyThreadState_GetUnchecked()` function: similar to +:c:func:`PyThreadState_Get()`, but don't kill the process with a fatal error if +it is NULL. The caller is responsible to check if the result is NULL. +Previously, the function was private and known as +``_PyThreadState_UncheckedGet()``. Patch by Victor Stinner. |