]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-112026: Add again _PyThreadState_UncheckedGet() function (#112121)
authorVictor Stinner <vstinner@python.org>
Wed, 15 Nov 2023 18:15:03 +0000 (19:15 +0100)
committerGitHub <noreply@github.com>
Wed, 15 Nov 2023 18:15:03 +0000 (19:15 +0100)
Add again the private _PyThreadState_UncheckedGet() function as an
alias to the new public PyThreadState_GetUnchecked() function.

Include/cpython/pystate.h
Misc/NEWS.d/next/C API/2023-11-15-18-36-21.gh-issue-112026._Yybr5.rst [new file with mode: 0644]

index 7f2378ae76fe5c31d992544705459857a0db2e7c..decafde474b029d38a0880ec4f155f8674649fb9 100644 (file)
@@ -231,6 +231,9 @@ struct _ts {
  * if it is NULL. */
 PyAPI_FUNC(PyThreadState *) PyThreadState_GetUnchecked(void);
 
+// Alias kept for backward compatibility
+#define _PyThreadState_UncheckedGet PyThreadState_GetUnchecked
+
 
 // Disable tracing and profiling.
 PyAPI_FUNC(void) PyThreadState_EnterTracing(PyThreadState *tstate);
diff --git a/Misc/NEWS.d/next/C API/2023-11-15-18-36-21.gh-issue-112026._Yybr5.rst b/Misc/NEWS.d/next/C API/2023-11-15-18-36-21.gh-issue-112026._Yybr5.rst
new file mode 100644 (file)
index 0000000..0c39c78
--- /dev/null
@@ -0,0 +1,3 @@
+Add again the private ``_PyThreadState_UncheckedGet()`` function as an alias
+to the new public :c:func:`PyThreadState_GetUnchecked` function. Patch by
+Victor Stinner.