diff options
author | Benjamin Peterson <benjamin@python.org> | 2015-04-06 09:59:23 -0400 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2015-04-06 09:59:23 -0400 |
commit | bf7649f3be67e5f34e67a4e63494795eec85fa87 (patch) | |
tree | ec526c97230906dc4fc059e21a6b99cde1e21091 /Python/pylifecycle.c | |
parent | 89d7c5ae82e4591e9c2d750d3935fd44b49fc5a5 (diff) | |
download | cpython-bf7649f3be67e5f34e67a4e63494795eec85fa87.tar.gz |
fix building without threads (closes #23877)
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r-- | Python/pylifecycle.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index bab3a2f38a..e5645494e6 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -1299,8 +1299,12 @@ _Py_PrintFatalError(int fd) return; display_stack: +#ifdef WITH_THREAD /* PyGILState_GetThisThreadState() works even if the GIL was released */ tstate = PyGILState_GetThisThreadState(); +#else + tstate = PyThreadState_GET(); +#endif if (tstate == NULL) { /* _Py_DumpTracebackThreads() requires the thread state to display * frames */ |