Skip to content

Commit 7e2308a

Browse files
authored
gh-112026: Add again _PyThreadState_UncheckedGet() function (#112121)
Add again the private _PyThreadState_UncheckedGet() function as an alias to the new public PyThreadState_GetUnchecked() function.
1 parent e5dfcc2 commit 7e2308a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Include/cpython/pystate.h

+3
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,9 @@ struct _ts {
231231
* if it is NULL. */
232232
PyAPI_FUNC(PyThreadState *) PyThreadState_GetUnchecked(void);
233233

234+
// Alias kept for backward compatibility
235+
#define _PyThreadState_UncheckedGet PyThreadState_GetUnchecked
236+
234237

235238
// Disable tracing and profiling.
236239
PyAPI_FUNC(void) PyThreadState_EnterTracing(PyThreadState *tstate);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Add again the private ``_PyThreadState_UncheckedGet()`` function as an alias
2+
to the new public :c:func:`PyThreadState_GetUnchecked` function. Patch by
3+
Victor Stinner.

0 commit comments

Comments
 (0)