summaryrefslogtreecommitdiff
path: root/src/if_python3.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-05-15 17:49:05 +0200
committerBram Moolenaar <Bram@vim.org>2013-05-15 17:49:05 +0200
commit71700b8903a8ccd172ae739f53520b59fc153bca (patch)
tree962e55687d43f70d0f5c4b0f226db3cb523f4d8c /src/if_python3.c
parenta4720019cfca02fa0c04358daa562334bb716d57 (diff)
downloadvim-71700b8903a8ccd172ae739f53520b59fc153bca.zip
updated for version 7.3.956
Problem: Python vim.bindeval() causes SIGABRT. Solution: Make pygilstate a local variable. (Yukihiro Nakadaira)
Diffstat (limited to 'src/if_python3.c')
-rw-r--r--src/if_python3.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/if_python3.c b/src/if_python3.c
index 2f98a0462..daf517f77 100644
--- a/src/if_python3.c
+++ b/src/if_python3.c
@@ -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);