summaryrefslogtreecommitdiff
path: root/python/header-py.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2003-05-06 19:57:10 +0000
committerjbj <devnull@localhost>2003-05-06 19:57:10 +0000
commit3743a6283b6e644034ebacf0439a9eb468e25429 (patch)
tree9505b1e22541afb94f3fb6d7c9c886626f1022e6 /python/header-py.c
parent12a12cf3982e160c342e7f9ba714d5734b64aefa (diff)
downloadrpm-3743a6283b6e644034ebacf0439a9eb468e25429.tar.gz
rpm-3743a6283b6e644034ebacf0439a9eb468e25429.tar.bz2
rpm-3743a6283b6e644034ebacf0439a9eb468e25429.zip
Fix s/bc/mpw/ typos in mpstr.
Fix cut and paste booboo, s/rshift/lshift/ for when x << y. CVS patchset: 6819 CVS date: 2003/05/06 19:57:10
Diffstat (limited to 'python/header-py.c')
-rw-r--r--python/header-py.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/python/header-py.c b/python/header-py.c
index 11fdbe256..2aad11c42 100644
--- a/python/header-py.c
+++ b/python/header-py.c
@@ -421,14 +421,19 @@ static struct PyMethodDef hdr_methods[] = {
{NULL, NULL} /* sentinel */
};
-/** \ingroup py_c
- */
-static PyObject * hdr_getattr(hdrObject * s, char * name)
+static PyObject * hdr_getattro(PyObject * o, PyObject * n)
/*@*/
{
- return Py_FindMethod(hdr_methods, (PyObject * ) s, name);
+ return PyObject_GenericGetAttr(o, n);
}
+static int hdr_setattro(PyObject * o, PyObject * n, PyObject * v)
+ /*@*/
+{
+ return PyObject_GenericSetAttr(o, n, v);
+}
+
+
/** \ingroup py_c
*/
static void hdr_dealloc(hdrObject * s)
@@ -643,7 +648,7 @@ PyTypeObject hdr_Type = {
0, /* tp_itemsize */
(destructor) hdr_dealloc, /* tp_dealloc */
0, /* tp_print */
- (getattrfunc) hdr_getattr, /* tp_getattr */
+ (getattrfunc) 0, /* tp_getattr */
0, /* tp_setattr */
(cmpfunc) hdr_compare, /* tp_compare */
0, /* tp_repr */
@@ -653,8 +658,8 @@ PyTypeObject hdr_Type = {
hdr_hash, /* tp_hash */
0, /* tp_call */
0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
+ (getattrofunc) hdr_getattro, /* tp_getattro */
+ (setattrofunc) hdr_setattro, /* tp_setattro */
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT, /* tp_flags */
hdr_doc, /* tp_doc */