- python: permit headers to be hashed.
authorjbj <devnull@localhost>
Tue, 15 Oct 2002 18:52:50 +0000 (18:52 +0000)
committerjbj <devnull@localhost>
Tue, 15 Oct 2002 18:52:50 +0000 (18:52 +0000)
CVS patchset: 5780
CVS date: 2002/10/15 18:52:50

python/header-py.c
python/rpmts-py.c

index 9a25855..c790c93 100644 (file)
@@ -336,6 +336,11 @@ static int hdr_compare(hdrObject * a, hdrObject * b)
     return rpmVersionCompare(a->h, b->h);
 }
 
+static long hdr_hash(hdrObject *h)
+{
+    return h;
+}
+
 /** \ingroup python
  */
 /*@unchecked@*/ /*@observer@*/
@@ -594,7 +599,7 @@ PyTypeObject hdr_Type = {
        0,                              /* tp_as_number */
        0,                              /* tp_as_sequence */
        &hdr_as_mapping,                /* tp_as_mapping */
-       0,                              /* tp_hash */
+       hdr_hash,                       /* tp_hash */
        0,                              /* tp_call */
        0,                              /* tp_str */
        0,                              /* tp_getattro */
index 12f7204..6600c17 100644 (file)
@@ -341,6 +341,11 @@ fprintf(stderr, "*** rpmts_SolveCallback(%p,%p,%p) \"%s\"\n", ts, ds, data, rpmd
     return res;
 }
 
+static long hdr_hash(hdrObject *h)
+{
+    return h;
+}
+
 /** \ingroup python
  */
 static PyObject *