changeset 3703:e13f2f3568e1 v7.3.611

updated for version 7.3.611 Problem: Can't use Vim dictionary as self argument in Python. Solution: Fix the check for the "self" argument. (ZyX)
author Bram Moolenaar <bram@vim.org>
date Wed, 25 Jul 2012 15:36:04 +0200
parents 6d431ba1d90a
children 5d6c73eb5333
files src/if_py_both.h src/version.c
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -1284,9 +1284,10 @@ FunctionCall(PyObject *self, PyObject *a
 	selfdictObject = PyDict_GetItemString(kwargs, "self");
 	if (selfdictObject != NULL)
 	{
-	    if (!PyDict_Check(selfdictObject))
+	    if (!PyMapping_Check(selfdictObject))
 	    {
-		PyErr_SetString(PyExc_TypeError, _("'self' argument must be a dictionary"));
+		PyErr_SetString(PyExc_TypeError,
+				   _("'self' argument must be a dictionary"));
 		clear_tv(&args);
 		return NULL;
 	    }
--- a/src/version.c
+++ b/src/version.c
@@ -715,6 +715,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    611,
+/**/
     610,
 /**/
     609,