File tree 1 file changed +11
-11
lines changed
1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -69,8 +69,15 @@ extern _Py_thread_local PyThreadState *_Py_tss_tstate;
69
69
#endif
70
70
PyAPI_DATA (PyThreadState * ) _PyThreadState_GetCurrent (void );
71
71
72
+ /* Get the current Python thread state.
73
+
74
+ This function is unsafe: it does not check for error and it can return NULL.
75
+
76
+ The caller must hold the GIL.
77
+
78
+ See also PyThreadState_Get() and _PyThreadState_UncheckedGet(). */
72
79
static inline PyThreadState *
73
- _PyRuntimeState_GetThreadState ( _PyRuntimeState * runtime )
80
+ _PyThreadState_GET ( void )
74
81
{
75
82
#if defined(HAVE_THREAD_LOCAL ) && !defined(Py_BUILD_CORE_MODULE )
76
83
return _Py_tss_tstate ;
@@ -79,20 +86,13 @@ _PyRuntimeState_GetThreadState(_PyRuntimeState *runtime)
79
86
#endif
80
87
}
81
88
82
-
83
- /* Get the current Python thread state.
84
-
85
- This function is unsafe: it does not check for error and it can return NULL.
86
-
87
- The caller must hold the GIL.
88
-
89
- See also PyThreadState_Get() and _PyThreadState_UncheckedGet(). */
90
89
static inline PyThreadState *
91
- _PyThreadState_GET ( void )
90
+ _PyRuntimeState_GetThreadState ( _PyRuntimeState * Py_UNUSED ( runtime ) )
92
91
{
93
- return _PyRuntimeState_GetThreadState ( & _PyRuntime );
92
+ return _PyThreadState_GET ( );
94
93
}
95
94
95
+
96
96
static inline void
97
97
_Py_EnsureFuncTstateNotNULL (const char * func , PyThreadState * tstate )
98
98
{
You can’t perform that action at this time.
0 commit comments