From 8d3cad1d618e7cbc45ed71b6d633914688d292aa Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Fri, 26 Mar 2010 17:07:00 +0200 Subject: [PATCH] Add ds.Instance() method to python bindings - the naming between header/rpmte/rpmds "instance" is wonderfully inconsistent... oh well --- python/rpmds-py.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/rpmds-py.c b/python/rpmds-py.c index 0b5d9df..0e98d33 100644 --- a/python/rpmds-py.c +++ b/python/rpmds-py.c @@ -178,6 +178,11 @@ static PyObject *rpmds_Compare(rpmdsObject * s, PyObject * o) return PyBool_FromLong(rpmdsCompare(s->ds, ods->ds)); } +static PyObject *rpmds_Instance(rpmdsObject * s) +{ + return Py_BuildValue("i", rpmdsInstance(s->ds)); +} + static PyObject * rpmds_Rpmlib(rpmdsObject * s) { rpmds ds = NULL; @@ -228,6 +233,8 @@ The current index in ds is positioned at overlapping member upon success.\n" }, "ds.Rpmlib -> nds - Return internal rpmlib dependency set.\n"}, {"Compare", (PyCFunction)rpmds_Compare, METH_O, NULL}, + {"Instance", (PyCFunction)rpmds_Instance, METH_O, + NULL}, {NULL, NULL} /* sentinel */ }; -- 2.7.4