From b88adbf844612281d3ed11166bbf03368f7ed704 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 14 Oct 2012 05:20:12 +0200 Subject: updated for version 7.3.691 Problem: State specific to the Python thread is discarded. Solution: Keep state between threads. (Paul) --- src/if_python.c | 6 ++++-- src/version.c | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/if_python.c b/src/if_python.c index c194598b7..2a53c93b0 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 01d679301..2d9529ce5 100644 --- a/src/version.c +++ b/src/version.c @@ -719,6 +719,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 691, /**/ 690, /**/ -- cgit v1.2.1