diff options
Diffstat (limited to 'src/if_python.c')
-rw-r--r-- | src/if_python.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/if_python.c b/src/if_python.c index fa3fc88a8..a54a0e217 100644 --- a/src/if_python.c +++ b/src/if_python.c @@ -1539,12 +1539,12 @@ ListGetattr(PyObject *self, char *name) static PyObject * FunctionGetattr(PyObject *self, char *name) { - FunctionObject *this = (FunctionObject *)(self); + PyObject *r; - if (strcmp(name, "name") == 0) - return PyString_FromString((char *)(this->name)); - else if (strcmp(name, "__members__") == 0) - return ObjectDir(NULL, FunctionAttrs); + r = FunctionAttr((FunctionObject *)(self), name); + + if (r || PyErr_Occurred()) + return r; else return Py_FindMethod(FunctionMethods, self, name); } |