forked from aniani/vim
updated for version 7.3.698
Problem: Python 3 does not preserve state beween commands. Solution: Preserve the state. (Paul Ollis)
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user