diff options
author | jbj <devnull@localhost> | 2003-05-04 17:34:53 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2003-05-04 17:34:53 +0000 |
commit | 3db8afedc08c3f7425438ff029b5413456e6969d (patch) | |
tree | d82bdbf2827072889c0f4433778d2895c3df2ac9 /python/rpmmi-py.c | |
parent | 66964f525cee898d418d6aa0da10a785b44f6692 (diff) | |
download | librpm-tizen-3db8afedc08c3f7425438ff029b5413456e6969d.tar.gz librpm-tizen-3db8afedc08c3f7425438ff029b5413456e6969d.tar.bz2 librpm-tizen-3db8afedc08c3f7425438ff029b5413456e6969d.zip |
Use getattro/setattro throughout.
Convert to mpfprintlin from diddled mpprintln.
CVS patchset: 6811
CVS date: 2003/05/04 17:34:53
Diffstat (limited to 'python/rpmmi-py.c')
-rw-r--r-- | python/rpmmi-py.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/python/rpmmi-py.c b/python/rpmmi-py.c index aa37b2b3f..3023968e7 100644 --- a/python/rpmmi-py.c +++ b/python/rpmmi-py.c @@ -211,12 +211,16 @@ static void rpmmi_dealloc(/*@only@*/ /*@null@*/ rpmmiObject * s) } } -/** \ingroup py_c - */ -static PyObject * rpmmi_getattr (rpmmiObject *s, char *name) +static PyObject * rpmmi_getattro(PyObject * o, PyObject * n) + /*@*/ +{ + return PyObject_GenericGetAttr(o, n); +} + +static int rpmmi_setattro(PyObject * o, PyObject * n, PyObject * v) /*@*/ { - return Py_FindMethod (rpmmi_methods, (PyObject *) s, name); + return PyObject_GenericSetAttr(o, n, v); } /** @@ -236,7 +240,7 @@ PyTypeObject rpmmi_Type = { 0, /* tp_itemsize */ (destructor) rpmmi_dealloc, /* tp_dealloc */ 0, /* tp_print */ - (getattrfunc) rpmmi_getattr, /* tp_getattr */ + (getattrfunc)0, /* tp_getattr */ 0, /* tp_setattr */ 0, /* tp_compare */ 0, /* tp_repr */ @@ -246,8 +250,8 @@ PyTypeObject rpmmi_Type = { 0, /* tp_hash */ 0, /* tp_call */ 0, /* tp_str */ - 0, /* tp_getattro */ - 0, /* tp_setattro */ + (getattrofunc) rpmmi_getattro, /* tp_getattro */ + (setattrofunc) rpmmi_setattro, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT, /* tp_flags */ rpmmi_doc, /* tp_doc */ |