static PyObject * BufferGetattr(PyObject *self, char *name) { PyObject *r; if ((r = BufferAttrValid((BufferObject *)(self), name))) return r; if (CheckBuffer((BufferObject *)(self))) return NULL; r = BufferAttr((BufferObject *)(self), name); if (r || PyErr_Occurred()) return r; else return Py_FindMethod(BufferMethods, self, name); }
static PyObject * 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; r = BufferAttr((BufferObject *)(self), name); if (r || PyErr_Occurred()) return r; else return PyObject_GenericGetAttr(self, nameobj); }