diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-05-15 17:49:05 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-05-15 17:49:05 +0200 |
commit | 71700b8903a8ccd172ae739f53520b59fc153bca (patch) | |
tree | 962e55687d43f70d0f5c4b0f226db3cb523f4d8c /src/if_python3.c | |
parent | a4720019cfca02fa0c04358daa562334bb716d57 (diff) | |
download | vim-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.c | 5 |
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); |