summaryrefslogtreecommitdiff
path: root/Python/thread_nt.h
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2017-09-05 21:43:08 -0700
committerGitHub <noreply@github.com>2017-09-05 21:43:08 -0700
commit05351c1bd8b70d1878527762174cdaaba3572395 (patch)
treee97ef4ba0ae7ffe5bd2c8969199616bffbbc4d6f /Python/thread_nt.h
parent833860615bedfd2484ac0623d6f01ff0578ba09f (diff)
downloadcpython-git-05351c1bd8b70d1878527762174cdaaba3572395.tar.gz
Revert "bpo-30860: Consolidate stateful runtime globals." (#3379)
Windows buildbots started failing due to include-related errors.
Diffstat (limited to 'Python/thread_nt.h')
-rw-r--r--Python/thread_nt.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/Python/thread_nt.h b/Python/thread_nt.h
index 2f3a71b86a..47eb4b6e94 100644
--- a/Python/thread_nt.h
+++ b/Python/thread_nt.h
@@ -189,10 +189,9 @@ PyThread_start_new_thread(void (*func)(void *), void *arg)
return PYTHREAD_INVALID_THREAD_ID;
obj->func = func;
obj->arg = arg;
- PyThreadState *tstate = PyThreadState_GET();
- size_t stacksize = tstate ? tstate->interp->pythread_stacksize : 0;
hThread = (HANDLE)_beginthreadex(0,
- Py_SAFE_DOWNCAST(stacksize, Py_ssize_t, unsigned int),
+ Py_SAFE_DOWNCAST(_pythread_stacksize,
+ Py_ssize_t, unsigned int),
bootstrap, obj,
0, &threadID);
if (hThread == 0) {
@@ -333,13 +332,13 @@ _pythread_nt_set_stacksize(size_t size)
{
/* set to default */
if (size == 0) {
- PyThreadState_GET()->interp->pythread_stacksize = 0;
+ _pythread_stacksize = 0;
return 0;
}
/* valid range? */
if (size >= THREAD_MIN_STACKSIZE && size < THREAD_MAX_STACKSIZE) {
- PyThreadState_GET()->interp->pythread_stacksize = size;
+ _pythread_stacksize = size;
return 0;
}