diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2017-09-05 21:43:08 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-05 21:43:08 -0700 |
commit | 05351c1bd8b70d1878527762174cdaaba3572395 (patch) | |
tree | e97ef4ba0ae7ffe5bd2c8969199616bffbbc4d6f /Python/thread_pthread.h | |
parent | 833860615bedfd2484ac0623d6f01ff0578ba09f (diff) | |
download | cpython-05351c1bd8b70d1878527762174cdaaba3572395.tar.gz cpython-05351c1bd8b70d1878527762174cdaaba3572395.zip |
Revert "bpo-30860: Consolidate stateful runtime globals." (#3379)
Windows buildbots started failing due to include-related errors.
Diffstat (limited to 'Python/thread_pthread.h')
-rw-r--r-- | Python/thread_pthread.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h index ea05b6fbcfe..268dec41168 100644 --- a/Python/thread_pthread.h +++ b/Python/thread_pthread.h @@ -205,9 +205,8 @@ PyThread_start_new_thread(void (*func)(void *), void *arg) return PYTHREAD_INVALID_THREAD_ID; #endif #if defined(THREAD_STACK_SIZE) - PyThreadState *tstate = PyThreadState_GET(); - size_t stacksize = tstate ? tstate->interp->pythread_stacksize : 0; - tss = (stacksize != 0) ? stacksize : THREAD_STACK_SIZE; + tss = (_pythread_stacksize != 0) ? _pythread_stacksize + : THREAD_STACK_SIZE; if (tss != 0) { if (pthread_attr_setstacksize(&attrs, tss) != 0) { pthread_attr_destroy(&attrs); @@ -579,7 +578,7 @@ _pythread_pthread_set_stacksize(size_t size) /* set to default */ if (size == 0) { - PyThreadState_GET()->interp->pythread_stacksize = 0; + _pythread_stacksize = 0; return 0; } @@ -596,7 +595,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; + _pythread_stacksize = size; return 0; } } |