diff src/if_python3.c @ 4415:0bbacb6a83bd v7.3.956

updated for version 7.3.956 Problem: Python vim.bindeval() causes SIGABRT. Solution: Make pygilstate a local variable. (Yukihiro Nakadaira)
author Bram Moolenaar <bram@vim.org>
date Wed, 15 May 2013 17:49:05 +0200
parents 7b789d337820
children c16602758d84
line wrap: on
line diff
--- 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 *c
 #endif
     PyObject		*cmdstr;
     PyObject		*cmdbytes;
+    PyGILState_STATE	pygilstate;
 
 #if defined(MACOS) && !defined(MACOS_X_UNIX)
     GetPort(&oldPort);