mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
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:
@@ -740,9 +740,10 @@ Python_Init(void)
|
|||||||
#else
|
#else
|
||||||
PyMac_Initialize();
|
PyMac_Initialize();
|
||||||
#endif
|
#endif
|
||||||
/* Initialise threads and save the state using PyGILState_Ensure.
|
/* Initialise threads, and save the state using PyGILState_Ensure.
|
||||||
* Without this call, thread-specific state (such as the system trace
|
* Without the call to PyGILState_Ensure, thread specific state (such
|
||||||
* hook), will be lost between invocations of Python code. */
|
* as the system trace hook), will be lost between invocations of
|
||||||
|
* Python code. */
|
||||||
PyEval_InitThreads();
|
PyEval_InitThreads();
|
||||||
pygilstate = PyGILState_Ensure();
|
pygilstate = PyGILState_Ensure();
|
||||||
#ifdef DYNAMIC_PYTHON
|
#ifdef DYNAMIC_PYTHON
|
||||||
|
@@ -731,8 +731,12 @@ Python3_Init(void)
|
|||||||
#else
|
#else
|
||||||
PyMac_Initialize();
|
PyMac_Initialize();
|
||||||
#endif
|
#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();
|
PyEval_InitThreads();
|
||||||
|
pygilstate = PyGILState_Ensure();
|
||||||
|
|
||||||
#ifdef DYNAMIC_PYTHON3
|
#ifdef DYNAMIC_PYTHON3
|
||||||
get_py3_exceptions();
|
get_py3_exceptions();
|
||||||
|
@@ -719,6 +719,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
698,
|
||||||
/**/
|
/**/
|
||||||
697,
|
697,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user