]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.3.691 v7.3.691
authorBram Moolenaar <Bram@vim.org>
Sun, 14 Oct 2012 03:20:12 +0000 (05:20 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 14 Oct 2012 03:20:12 +0000 (05:20 +0200)
Problem:    State specific to the Python thread is discarded.
Solution:   Keep state between threads. (Paul)

src/if_python.c
src/version.c

index c194598b711bce956196eb0abfb75559550352ea..2a53c93b0ca184cae866bd7744f91d5ffb243bdb 100644 (file)
@@ -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
index 01d67930180d964e9cf2f3feea4ad04300acaea3..2d9529ce5c2fb985360b9b905fb01e5b85c6b969 100644 (file)
@@ -719,6 +719,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    691,
 /**/
     690,
 /**/