updated for version 7.3.956
Problem: Python vim.bindeval() causes SIGABRT.
Solution: Make pygilstate a local variable. (Yukihiro Nakadaira)
diff --git a/src/if_python3.c b/src/if_python3.c
index 2f98a04..daf517f 100644
--- a/src/if_python3.c
+++ b/src/if_python3.c
@@ -699,8 +699,6 @@
* 1. Python interpreter main program.
*/
-static PyGILState_STATE pygilstate = PyGILState_UNLOCKED;
-
void
python3_end()
{
@@ -718,7 +716,7 @@
if (Py_IsInitialized())
{
// acquire lock before finalizing
- pygilstate = PyGILState_Ensure();
+ PyGILState_Ensure();
Py_Finalize();
}
@@ -826,6 +824,7 @@
#endif
PyObject *cmdstr;
PyObject *cmdbytes;
+ PyGILState_STATE pygilstate;
#if defined(MACOS) && !defined(MACOS_X_UNIX)
GetPort(&oldPort);