# HG changeset patch # User Bram Moolenaar # Date 1350184812 -7200 # Node ID 7f10daa706bb6ed0c39f1d2905cd78368a98d19f # Parent 9f622266fbf4ffc6c42d256b4cc374cfe67e2948 updated for version 7.3.691 Problem: State specific to the Python thread is discarded. Solution: Keep state between threads. (Paul) diff --git a/src/if_python.c b/src/if_python.c --- 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 --- 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,