From d73501602f863a54c872ce103cd3fa119e38bac9 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 3 Oct 2023 18:53:51 +0200 Subject: 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(). --- Python/pystate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/pystate.c') diff --git a/Python/pystate.c b/Python/pystate.c index 25a957c31f0..ae33259f8df 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -1908,7 +1908,7 @@ PyThreadState_SetAsyncExc(unsigned long id, PyObject *exc) //--------------------------------- PyThreadState * -_PyThreadState_UncheckedGet(void) +PyThreadState_GetUnchecked(void) { return current_fast_get(&_PyRuntime); } -- cgit v1.2.3