summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-08-17 22:26:51 +0000
committerVictor Stinner <victor.stinner@haypocalc.com>2010-08-17 22:26:51 +0000
commit32765cc90a223dc7c1434b716a9ee46e57a67f17 (patch)
treea7f577fedb61e87dc6e83a60c3992d4e5c12048d /Python/pythonrun.c
parent7520e4d7d44c703de72cbbbd41a0adb67b03e889 (diff)
downloadcpython-32765cc90a223dc7c1434b716a9ee46e57a67f17.tar.gz
Issue #8063: Call _PyGILState_Init() earlier in Py_InitializeEx().
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index a7a54ba710..76a8eef2df 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -206,6 +206,11 @@ Py_InitializeEx(int install_sigs)
Py_FatalError("Py_Initialize: can't make first thread");
(void) PyThreadState_Swap(tstate);
+ /* auto-thread-state API, if available */
+#ifdef WITH_THREAD
+ _PyGILState_Init(interp, tstate);
+#endif /* WITH_THREAD */
+
_Py_ReadyTypes();
if (!_PyFrame_Init())
@@ -288,11 +293,6 @@ Py_InitializeEx(int install_sigs)
Py_FatalError(
"Py_Initialize: can't initialize sys standard streams");
- /* auto-thread-state API, if available */
-#ifdef WITH_THREAD
- _PyGILState_Init(interp, tstate);
-#endif /* WITH_THREAD */
-
if (!Py_NoSiteFlag)
initsite(); /* Module site */
}