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/rpmfd-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/rpmfd-py.c')
-rw-r--r-- | python/rpmfd-py.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/python/rpmfd-py.c b/python/rpmfd-py.c index dafc0aa4d..354797887 100644 --- a/python/rpmfd-py.c +++ b/python/rpmfd-py.c @@ -176,12 +176,16 @@ rpmfd_dealloc(/*@only@*/ /*@null@*/ rpmfdObject * s) } } -/** \ingroup py_c - */ -static PyObject * rpmfd_getattr(rpmfdObject * o, char * name) +static PyObject * rpmfd_getattro(PyObject * o, PyObject * n) + /*@*/ +{ + return PyObject_GenericGetAttr(o, n); +} + +static int rpmfd_setattro(PyObject * o, PyObject * n, PyObject * v) /*@*/ { - return Py_FindMethod(rpmfd_methods, (PyObject *) o, name); + return PyObject_GenericSetAttr(o, n, v); } /** \ingroup py_c @@ -278,7 +282,7 @@ PyTypeObject rpmfd_Type = { /* methods */ (destructor) rpmfd_dealloc, /* tp_dealloc */ 0, /* tp_print */ - (getattrfunc) rpmfd_getattr, /* tp_getattr */ + (getattrfunc)0, /* tp_getattr */ (setattrfunc)0, /* tp_setattr */ (cmpfunc)0, /* tp_compare */ (reprfunc)0, /* tp_repr */ @@ -288,8 +292,8 @@ PyTypeObject rpmfd_Type = { (hashfunc)0, /* tp_hash */ (ternaryfunc)0, /* tp_call */ (reprfunc)0, /* tp_str */ - 0, /* tp_getattro */ - 0, /* tp_setattro */ + (getattrofunc) rpmfd_getattro, /* tp_getattro */ + (setattrofunc) rpmfd_setattro, /* tp_setattro */ 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT, /* tp_flags */ rpmfd_doc, /* tp_doc */ |