diff src/if_py_both.h @ 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 1afdb7d21c14
children 58b74ab7f29d
line wrap: on
line diff
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -1298,7 +1298,14 @@ FunctionCall(PyObject *self, PyObject *a
 	}
     }
 
+    Py_BEGIN_ALLOW_THREADS
+    Python_Lock_Vim();
+
     error = func_call(name, &args, selfdict, &rettv);
+
+    Python_Release_Vim();
+    Py_END_ALLOW_THREADS
+
     if (error != OK)
     {
 	result = NULL;