[Python-checkins] cpython: fix building without threads (closes #23877)
benjamin.peterson
python-checkins at python.org
Mon Apr 6 15:59:30 CEST 2015
https://hg.python.org/cpython/rev/29f51c4ae11a
changeset: 95451:29f51c4ae11a
user: Benjamin Peterson <benjamin at python.org>
date: Mon Apr 06 09:59:23 2015 -0400
summary:
fix building without threads (closes #23877)
files:
Python/pylifecycle.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -1299,8 +1299,12 @@
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 */
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list