diff options
author | Benjamin Peterson <benjamin@python.org> | 2015-04-06 13:59:23 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2015-04-06 13:59:23 (GMT) |
commit | 55c14355ac66498814265ceacf2bbddc89c5597b (patch) | |
tree | d3080b6206aea1dafb49bb4863312185b49d8145 /Python/pylifecycle.c | |
parent | 3fbcafa47693f03a23b86757916b2c4d01f4deec (diff) | |
download | cpython-55c14355ac66498814265ceacf2bbddc89c5597b.zip cpython-55c14355ac66498814265ceacf2bbddc89c5597b.tar.gz cpython-55c14355ac66498814265ceacf2bbddc89c5597b.tar.bz2 |
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 bab3a2f..e564549 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 */ |