summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@vim.org>2012-10-14 05:20:12 +0200
committerBram Moolenaar <bram@vim.org>2012-10-14 05:20:12 +0200
commit4416dd08ab5b089cfa9ccb9cc31203b62bb076cd (patch)
treead77b7d7365b436c9fffd5ea4d8fbe860410a9f5
parent46868c19247e5c6a4d047230b6689b9a50bdd563 (diff)
downloadvim-4416dd08ab5b089cfa9ccb9cc31203b62bb076cd.tar.gz
updated for version 7.3.691v7.3.691v7-3-691
Problem: State specific to the Python thread is discarded. Solution: Keep state between threads. (Paul)
-rw-r--r--src/if_python.c6
-rw-r--r--src/version.c2
2 files changed, 6 insertions, 2 deletions
diff --git a/src/if_python.c b/src/if_python.c
index c194598b..2a53c93b 100644
--- a/src/if_python.c
+++ b/src/if_python.c
@@ -740,9 +740,11 @@ Python_Init(void)
#else
PyMac_Initialize();
#endif
- /* initialise threads */
+ /* 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. */
PyEval_InitThreads();
-
+ pygilstate = PyGILState_Ensure();
#ifdef DYNAMIC_PYTHON
get_exceptions();
#endif
diff --git a/src/version.c b/src/version.c
index 01d67930..2d9529ce 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 */
/**/
+ 691,
+/**/
690,
/**/
689,