diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-05-29 22:15:30 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-05-29 22:15:30 +0200 |
commit | 9e822c00b1fdf3e0604dbb520f593d8de6c15098 (patch) | |
tree | 2bfb2b78ea873331cc74f1d32183114b391c9aaf /src/if_python3.c | |
parent | 3e734ea2c7d6bc78cf5d2851c1e4ddbad2e028d1 (diff) | |
download | vim-git-9e822c00b1fdf3e0604dbb520f593d8de6c15098.tar.gz |
updated for version 7.3.1044v7.3.1044
Problem: Python: No {Buffer,TabPage,Window}.valid attributes.
Solution: Python patch 5: add .valid (ZyX)
Diffstat (limited to 'src/if_python3.c')
-rw-r--r-- | src/if_python3.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/if_python3.c b/src/if_python3.c index b7323c2a9..923d04696 100644 --- a/src/if_python3.c +++ b/src/if_python3.c @@ -1067,12 +1067,15 @@ static PyMappingMethods BufferAsMapping = { */ static PyObject * -BufferGetattro(PyObject *self, PyObject*nameobj) +BufferGetattro(PyObject *self, PyObject *nameobj) { PyObject *r; GET_ATTR_STRING(name, nameobj); + if ((r = BufferAttrValid((BufferObject *)(self), name))) + return r; + if (CheckBuffer((BufferObject *)(self))) return NULL; @@ -1094,8 +1097,9 @@ BufferSetattro(PyObject *self, PyObject *nameobj, PyObject *val) static PyObject * BufferDir(PyObject *self UNUSED) { - return Py_BuildValue("[sssss]", "name", "number", - "append", "mark", "range"); + return Py_BuildValue("[ssssssss]", + "name", "number", "vars", "options", "valid", + "append", "mark", "range"); } /******************/ @@ -1283,6 +1287,9 @@ TabPageGetattro(PyObject *self, PyObject *nameobj) GET_ATTR_STRING(name, nameobj); + if ((r = TabPageAttrValid((TabPageObject *)(self), name))) + return r; + if (CheckTabPage((TabPageObject *)(self))) return NULL; @@ -1303,6 +1310,9 @@ WindowGetattro(PyObject *self, PyObject *nameobj) GET_ATTR_STRING(name, nameobj); + if ((r = WindowAttrValid((WindowObject *)(self), name))) + return r; + if (CheckWindow((WindowObject *)(self))) return NULL; |