Skip to content

Commit c3f3371

Browse files
authored
use _PyThreadState_UncheckedGet, cant raise
1 parent a631f7e commit c3f3371

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/vmprof_common.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ PyThreadState * get_current_thread_state(void)
136136
{
137137
#if PY_MAJOR_VERSION < 3
138138
return _PyThreadState_Current;
139-
#elif PY_VERSION_HEX < 0x03050000
139+
#elif PY_VERSION_HEX < 0x03050200
140140
return (PyThreadState*) _Py_atomic_load_relaxed(&_PyThreadState_Current);
141141
#else
142-
return PyThreadState_GET();
142+
return _PyThreadState_UncheckedGet();
143143
#endif
144144
}

0 commit comments

Comments
 (0)