summaryrefslogtreecommitdiffstats
path: root/Python/thread_pthread.h
diff options
context:
space:
mode:
Diffstat (limited to 'Python/thread_pthread.h')
-rw-r--r--Python/thread_pthread.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h
index 6971405..6da8b3a 100644
--- a/Python/thread_pthread.h
+++ b/Python/thread_pthread.h
@@ -174,7 +174,7 @@ PyThread_start_new_thread(void (*func)(void *), void *arg)
return PYTHREAD_INVALID_THREAD_ID;
#endif
#if defined(THREAD_STACK_SIZE)
- PyThreadState *tstate = PyThreadState_GET();
+ PyThreadState *tstate = _PyThreadState_GET();
size_t stacksize = tstate ? tstate->interp->pythread_stacksize : 0;
tss = (stacksize != 0) ? stacksize : THREAD_STACK_SIZE;
if (tss != 0) {
@@ -591,7 +591,7 @@ _pythread_pthread_set_stacksize(size_t size)
/* set to default */
if (size == 0) {
- PyThreadState_GET()->interp->pythread_stacksize = 0;
+ _PyInterpreterState_GET_UNSAFE()->pythread_stacksize = 0;
return 0;
}
@@ -608,7 +608,7 @@ _pythread_pthread_set_stacksize(size_t size)
rc = pthread_attr_setstacksize(&attrs, size);
pthread_attr_destroy(&attrs);
if (rc == 0) {
- PyThreadState_GET()->interp->pythread_stacksize = size;
+ _PyInterpreterState_GET_UNSAFE()->pythread_stacksize = size;
return 0;
}
}