1
0
forked from aniani/vim

updated for version 7.3.956

Problem:    Python vim.bindeval() causes SIGABRT.
Solution:   Make pygilstate a local variable. (Yukihiro Nakadaira)
This commit is contained in:
Bram Moolenaar
2013-05-15 17:49:05 +02:00
parent a4720019cf
commit 71700b8903
4 changed files with 32 additions and 15 deletions

View File

@@ -699,8 +699,6 @@ static PyObject *Py3Init_vim(void);
* 1. Python interpreter main program.
*/
static PyGILState_STATE pygilstate = PyGILState_UNLOCKED;
void
python3_end()
{
@@ -718,7 +716,7 @@ python3_end()
if (Py_IsInitialized())
{
// acquire lock before finalizing
pygilstate = PyGILState_Ensure();
PyGILState_Ensure();
Py_Finalize();
}
@@ -826,6 +824,7 @@ DoPy3Command(exarg_T *eap, const char *cmd, typval_T *rettv)
#endif
PyObject *cmdstr;
PyObject *cmdbytes;
PyGILState_STATE pygilstate;
#if defined(MACOS) && !defined(MACOS_X_UNIX)
GetPort(&oldPort);