Commit 0bd5fb01 authored by Berker Peksag's avatar Berker Peksag

Issue #24728: Fix building without threads.

Patch by Louis Dassy.
parent ddc7440b
......@@ -2642,8 +2642,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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment