diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2013-12-13 15:43:39 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2013-12-13 15:43:39 +0200 |
commit | 68a24e72b005f3ccbb7357b17c14457b0447f2d4 (patch) | |
tree | 73f7860895d7270b89ab02faf3ebef646704c711 /python/rpmds-py.c | |
parent | f720f23588af991a8a2469f39c45e38b8b15d7cb (diff) | |
download | rpm-68a24e72b005f3ccbb7357b17c14457b0447f2d4.tar.gz |
Use the pool-aware constructors for rpmfi and all rpmds types
- Doesn't actually change anything yet as pool is always NULL
Diffstat (limited to 'python/rpmds-py.c')
-rw-r--r-- | python/rpmds-py.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/python/rpmds-py.c b/python/rpmds-py.c index 30fb908fb..bedf170a9 100644 --- a/python/rpmds-py.c +++ b/python/rpmds-py.c @@ -172,9 +172,10 @@ static PyObject *rpmds_Instance(rpmdsObject * s) static PyObject * rpmds_Rpmlib(rpmdsObject * s) { rpmds ds = NULL; + rpmstrPool pool = NULL; /* XXX check return code, permit arg (NULL uses system default). */ - rpmdsRpmlib(&ds, NULL); + rpmdsRpmlibPool(pool, &ds, NULL); return rpmds_Wrap(&rpmds_Type, ds); } @@ -305,6 +306,7 @@ static PyObject * rpmds_new(PyTypeObject * subtype, PyObject *args, PyObject *kw rpmTagVal tagN = RPMTAG_REQUIRENAME; rpmds ds = NULL; Header h = NULL; + rpmstrPool pool = NULL; char * kwlist[] = {"obj", "tag", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO&:rpmds_new", kwlist, @@ -317,16 +319,16 @@ static PyObject * rpmds_new(PyTypeObject * subtype, PyObject *args, PyObject *kw rpmsenseFlags flags = RPMSENSE_ANY; /* TODO: if flags are specified, evr should be required too */ if (PyArg_ParseTuple(obj, "s|O&s", &name, depflags, &flags, &evr)) { - ds = rpmdsSingle(tagN, name, evr, flags); + ds = rpmdsSinglePool(pool, tagN, name, evr, flags); } else { PyErr_SetString(PyExc_ValueError, "invalid dependency tuple"); return NULL; } } else if (hdrFromPyObject(obj, &h)) { if (tagN == RPMTAG_NEVR) { - ds = rpmdsThis(h, RPMTAG_PROVIDENAME, RPMSENSE_EQUAL); + ds = rpmdsThisPool(pool, h, RPMTAG_PROVIDENAME, RPMSENSE_EQUAL); } else { - ds = rpmdsNew(h, tagN, 0); + ds = rpmdsNewPool(pool, h, tagN, 0); } } else { PyErr_SetString(PyExc_TypeError, "header or tuple expected"); |