summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/if_python.c7
-rw-r--r--src/if_python3.c6
-rw-r--r--src/version.c2
3 files changed, 11 insertions, 4 deletions
diff --git a/src/if_python.c b/src/if_python.c
index 2a53c93b0..5e792b16d 100644
--- a/src/if_python.c
+++ b/src/if_python.c
@@ -740,9 +740,10 @@ Python_Init(void)
#else
PyMac_Initialize();
#endif
- /* Initialise threads and save the state using PyGILState_Ensure.
- * Without this call, thread-specific state (such as the system trace
- * hook), will be lost between invocations of Python code. */
+ /* Initialise threads, and save the state using PyGILState_Ensure.
+ * Without the call to PyGILState_Ensure, thread specific state (such
+ * as the system trace hook), will be lost between invocations of
+ * Python code. */
PyEval_InitThreads();
pygilstate = PyGILState_Ensure();
#ifdef DYNAMIC_PYTHON
diff --git a/src/if_python3.c b/src/if_python3.c
index ea59a4233..e9f7400f8 100644
--- a/src/if_python3.c
+++ b/src/if_python3.c
@@ -731,8 +731,12 @@ Python3_Init(void)
#else
PyMac_Initialize();
#endif
- /* initialise threads, must be after Py_Initialize() */
+ /* Initialise threads, and save the state using PyGILState_Ensure.
+ * Without the call to PyGILState_Ensure, thread specific state (such
+ * as the system trace hook), will be lost between invocations of
+ * Python code. */
PyEval_InitThreads();
+ pygilstate = PyGILState_Ensure();
#ifdef DYNAMIC_PYTHON3
get_py3_exceptions();
diff --git a/src/version.c b/src/version.c
index d10266df8..6613e50da 100644
--- a/src/version.c
+++ b/src/version.c
@@ -720,6 +720,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 698,
+/**/
697,
/**/
696,