From: Benjamin Peterson Date: Mon, 6 Apr 2015 13:59:23 +0000 (-0400) Subject: fix building without threads (closes #23877) X-Git-Tag: v3.5.0a4~158 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=55c14355ac66498814265ceacf2bbddc89c5597b;p=thirdparty%2FPython%2Fcpython.git fix building without threads (closes #23877) --- diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index bab3a2f38a8c..e5645494e636 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 */