summaryrefslogtreecommitdiff
path: root/src/if_py_both.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/if_py_both.h')
-rw-r--r--src/if_py_both.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/if_py_both.h b/src/if_py_both.h
index 4905bed68..2fef1e426 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -1298,7 +1298,14 @@ FunctionCall(PyObject *self, PyObject *argsObject, PyObject *kwargs)
}
}
+ 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;