mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
parent
ddc7440b0e
commit
0bd5fb0112
1 changed files with 4 additions and 0 deletions
|
@ -2642,8 +2642,12 @@ _Py_PrintFatalError(int fd)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
display_stack:
|
display_stack:
|
||||||
|
#ifdef WITH_THREAD
|
||||||
/* PyGILState_GetThisThreadState() works even if the GIL was released */
|
/* PyGILState_GetThisThreadState() works even if the GIL was released */
|
||||||
tstate = PyGILState_GetThisThreadState();
|
tstate = PyGILState_GetThisThreadState();
|
||||||
|
#else
|
||||||
|
tstate = PyThreadState_GET();
|
||||||
|
#endif
|
||||||
if (tstate == NULL) {
|
if (tstate == NULL) {
|
||||||
/* _Py_DumpTracebackThreads() requires the thread state to display
|
/* _Py_DumpTracebackThreads() requires the thread state to display
|
||||||
* frames */
|
* frames */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue