Ejemplo n.º 1
0
    static PyObject *
WindowGetattr(PyObject *self, char *name)
{
    PyObject *r;

    if ((r = WindowAttrValid((WindowObject *)(self), name)))
	return r;

    if (CheckWindow((WindowObject *)(self)))
	return NULL;

    r = WindowAttr((WindowObject *)(self), name);
    if (r || PyErr_Occurred())
	return r;
    else
	return Py_FindMethod(WindowMethods, self, name);
}
Ejemplo n.º 2
0
static PyObject *
WindowGetattro(PyObject *self, PyObject *nameobj)
{
	PyObject *r;

	GET_ATTR_STRING(name, nameobj);

	if ((r = WindowAttrValid((WindowObject *)(self), name)))
		return r;

	if (CheckWindow((WindowObject *)(self)))
		return NULL;

	r = WindowAttr((WindowObject *)(self), name);
	if (r || PyErr_Occurred())
		return r;
	else
		return PyObject_GenericGetAttr(self, nameobj);
}