コード例 #1
0
ファイル: if_python.c プロジェクト: carozhu/macvim
    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);
}
コード例 #2
0
ファイル: if_python3.c プロジェクト: tonymagro/viw
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);
}