From: jbj Date: Tue, 15 Oct 2002 18:52:50 +0000 (+0000) Subject: - python: permit headers to be hashed. X-Git-Tag: rpm-4.4-release~928 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2782446f1e6e143beaf5df99ac635decb955b0d7;p=platform%2Fupstream%2Frpm.git - python: permit headers to be hashed. CVS patchset: 5780 CVS date: 2002/10/15 18:52:50 --- diff --git a/python/header-py.c b/python/header-py.c index 9a25855..c790c93 100644 --- a/python/header-py.c +++ b/python/header-py.c @@ -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 */ diff --git a/python/rpmts-py.c b/python/rpmts-py.c index 12f7204..6600c17 100644 --- a/python/rpmts-py.c +++ b/python/rpmts-py.c @@ -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 *