@@ -42,7 +42,7 @@ PERFORMANCE OF THIS SOFTWARE.
42
42
43
43
static PyInterpreterState * interp_head = NULL ;
44
44
45
- static PyThreadState * current_tstate = NULL ;
45
+ PyThreadState * _PyThreadState_Current = NULL ;
46
46
47
47
48
48
PyInterpreterState *
@@ -180,7 +180,7 @@ PyThreadState_Delete(tstate)
180
180
PyThreadState * * p ;
181
181
if (tstate == NULL )
182
182
Py_FatalError ("PyThreadState_Delete: NULL tstate" );
183
- if (tstate == current_tstate )
183
+ if (tstate == _PyThreadState_Current )
184
184
Py_FatalError ("PyThreadState_Delete: tstate is still current" );
185
185
interp = tstate -> interp ;
186
186
if (interp == NULL )
@@ -200,20 +200,20 @@ PyThreadState_Delete(tstate)
200
200
PyThreadState *
201
201
PyThreadState_Get ()
202
202
{
203
- if (current_tstate == NULL )
203
+ if (_PyThreadState_Current == NULL )
204
204
Py_FatalError ("PyThreadState_Get: no current thread" );
205
205
206
- return current_tstate ;
206
+ return _PyThreadState_Current ;
207
207
}
208
208
209
209
210
210
PyThreadState *
211
211
PyThreadState_Swap (new )
212
212
PyThreadState * new ;
213
213
{
214
- PyThreadState * old = current_tstate ;
214
+ PyThreadState * old = _PyThreadState_Current ;
215
215
216
- current_tstate = new ;
216
+ _PyThreadState_Current = new ;
217
217
218
218
return old ;
219
219
}
@@ -227,10 +227,10 @@ PyThreadState_Swap(new)
227
227
PyObject *
228
228
PyThreadState_GetDict ()
229
229
{
230
- if (current_tstate == NULL )
230
+ if (_PyThreadState_Current == NULL )
231
231
Py_FatalError ("PyThreadState_GetDict: no current thread" );
232
232
233
- if (current_tstate -> dict == NULL )
234
- current_tstate -> dict = PyDict_New ();
235
- return current_tstate -> dict ;
233
+ if (_PyThreadState_Current -> dict == NULL )
234
+ _PyThreadState_Current -> dict = PyDict_New ();
235
+ return _PyThreadState_Current -> dict ;
236
236
}
0 commit comments