@@ -41,7 +41,7 @@ static void slp_cstack_cacheclear(void)
41
41
static void
42
42
cstack_dealloc (PyCStackObject * cst )
43
43
{
44
- PyThreadState * ts = PyThreadState_GET ();
44
+ PyThreadState * ts = _PyThreadState_GET ();
45
45
ts -> interp -> st .cstack_chain = cst ;
46
46
SLP_CHAIN_REMOVE (PyCStackObject , & ts -> interp -> st .cstack_chain , cst , next ,
47
47
prev );
@@ -77,13 +77,13 @@ slp_cstack_new(PyCStackObject **cst, intptr_t *stackref, PyTaskletObject *task)
77
77
ts = task -> cstate -> tstate ;
78
78
}
79
79
if (ts == NULL ) {
80
- ts = PyThreadState_GET ();
80
+ ts = _PyThreadState_GET ();
81
81
}
82
82
83
83
stackbase = ts -> st .cstack_base ;
84
84
size = stackbase - stackref ;
85
85
86
- assert (size == 0 || ts == PyThreadState_GET ());
86
+ assert (size == 0 || ts == _PyThreadState_GET ());
87
87
assert (size >= 0 );
88
88
89
89
if (* cst != NULL ) {
@@ -223,7 +223,7 @@ PyTypeObject PyCStack_Type = {
223
223
static int
224
224
make_initial_stub (void )
225
225
{
226
- PyThreadState * ts = PyThreadState_GET ();
226
+ PyThreadState * ts = _PyThreadState_GET ();
227
227
int result ;
228
228
229
229
Py_CLEAR (ts -> st .initial_stub );
@@ -253,7 +253,7 @@ climb_stack_and_eval_frame(PyFrameObject *f)
253
253
* This way, initial_stub is always valid to be
254
254
* used to return to the main c stack.
255
255
*/
256
- PyThreadState * ts = PyThreadState_GET ();
256
+ PyThreadState * ts = _PyThreadState_GET ();
257
257
intptr_t probe ;
258
258
ptrdiff_t needed = & probe - ts -> st .cstack_base ;
259
259
/* in rare cases, the need might have vanished due to the recursion */
@@ -279,7 +279,7 @@ slp_run_tasklet(void)
279
279
* slp_transfer_return(). Therefore, this function must not hold
280
280
* any reference during the execution of these sub-functions.
281
281
*/
282
- PyThreadState * ts = PyThreadState_GET ();
282
+ PyThreadState * ts = _PyThreadState_GET ();
283
283
PyObject * retval ;
284
284
285
285
SLP_ASSERT_FRAME_IN_TRANSFER (ts );
@@ -314,7 +314,7 @@ slp_run_tasklet(void)
314
314
PyObject * _Py_HOT_FUNCTION
315
315
slp_eval_frame (PyFrameObject * f )
316
316
{
317
- PyThreadState * ts = PyThreadState_GET ();
317
+ PyThreadState * ts = _PyThreadState_GET ();
318
318
PyFrameObject * fprev = f -> f_back ;
319
319
intptr_t * stackref ;
320
320
PyObject * retval ;
@@ -405,7 +405,7 @@ get_current_main_and_watchdogs(PyThreadState *ts, PyObject *list)
405
405
{
406
406
PyTaskletObject * t ;
407
407
408
- assert (ts != PyThreadState_GET ()); /* don't kill ourself */
408
+ assert (ts != _PyThreadState_GET ()); /* don't kill ourself */
409
409
assert (PyList_CheckExact (list ));
410
410
411
411
/* kill watchdogs */
@@ -501,7 +501,7 @@ run_other_threads(PyObject **sleep, Py_ssize_t count)
501
501
*/
502
502
void slp_kill_tasks_with_stacks (PyThreadState * target_ts )
503
503
{
504
- PyThreadState * cts = PyThreadState_GET ();
504
+ PyThreadState * cts = _PyThreadState_GET ();
505
505
PyInterpreterState * interp = cts -> interp ;
506
506
int in_loop = 0 ;
507
507
@@ -845,7 +845,7 @@ void PyStackless_kill_tasks_with_stacks(int allthreads)
845
845
static PyObject *
846
846
eval_frame_callback (PyFrameObject * f , int exc , PyObject * retval )
847
847
{
848
- PyThreadState * ts = PyThreadState_GET ();
848
+ PyThreadState * ts = _PyThreadState_GET ();
849
849
PyTaskletObject * cur = ts -> st .current ;
850
850
PyCStackObject * cst ;
851
851
PyCFrameObject * cf = (PyCFrameObject * ) f ;
@@ -917,7 +917,7 @@ eval_frame_callback(PyFrameObject *f, int exc, PyObject *retval)
917
917
PyObject *
918
918
slp_eval_frame_newstack (PyFrameObject * f , int exc , PyObject * retval )
919
919
{
920
- PyThreadState * ts = PyThreadState_GET ();
920
+ PyThreadState * ts = _PyThreadState_GET ();
921
921
PyTaskletObject * cur = ts -> st .current ;
922
922
PyCFrameObject * cf = NULL ;
923
923
PyCStackObject * cst ;
@@ -1026,7 +1026,7 @@ PyUnwindObject *Py_UnwindToken = &unwind_token;
1026
1026
PyObject * _Py_HOT_FUNCTION
1027
1027
slp_frame_dispatch (PyFrameObject * f , PyFrameObject * stopframe , int exc , PyObject * retval )
1028
1028
{
1029
- PyThreadState * ts = PyThreadState_GET ();
1029
+ PyThreadState * ts = _PyThreadState_GET ();
1030
1030
PyFrameObject * first_frame = f ;
1031
1031
++ ts -> st .nesting_level ;
1032
1032
@@ -1070,7 +1070,7 @@ slp_frame_dispatch(PyFrameObject *f, PyFrameObject *stopframe, int exc, PyObject
1070
1070
static PyObject *
1071
1071
slp_frame_dispatch_top (PyObject * retval )
1072
1072
{
1073
- PyThreadState * ts = PyThreadState_GET ();
1073
+ PyThreadState * ts = _PyThreadState_GET ();
1074
1074
PyFrameObject * f = SLP_CLAIM_NEXT_FRAME (ts );
1075
1075
1076
1076
if (f == NULL ) return retval ;
0 commit comments