Mercurial > vim
comparison src/if_py_both.h @ 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 | 2d107086903a |
children | 956b1ed19282 |
comparison
equal
deleted
inserted
replaced
3702:6d431ba1d90a | 3703:e13f2f3568e1 |
---|---|
1282 if (kwargs != NULL) | 1282 if (kwargs != NULL) |
1283 { | 1283 { |
1284 selfdictObject = PyDict_GetItemString(kwargs, "self"); | 1284 selfdictObject = PyDict_GetItemString(kwargs, "self"); |
1285 if (selfdictObject != NULL) | 1285 if (selfdictObject != NULL) |
1286 { | 1286 { |
1287 if (!PyDict_Check(selfdictObject)) | 1287 if (!PyMapping_Check(selfdictObject)) |
1288 { | 1288 { |
1289 PyErr_SetString(PyExc_TypeError, _("'self' argument must be a dictionary")); | 1289 PyErr_SetString(PyExc_TypeError, |
1290 _("'self' argument must be a dictionary")); | |
1290 clear_tv(&args); | 1291 clear_tv(&args); |
1291 return NULL; | 1292 return NULL; |
1292 } | 1293 } |
1293 if (ConvertFromPyObject(selfdictObject, &selfdicttv) == -1) | 1294 if (ConvertFromPyObject(selfdictObject, &selfdicttv) == -1) |
1294 return NULL; | 1295 return NULL; |