summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-03-26 09:31:00 +0200
committerPanu Matilainen <pmatilai@redhat.com>2010-03-26 09:31:00 +0200
commit0d68cbf48efe57c4adf57a409df4bd57acc1bebd (patch)
treed9a45699699bc057dbbb9e2142f0804ba0bed79e /python
parent997954f793359d16af2d34ce9ca41d82a7acb0a1 (diff)
downloadlibrpm-tizen-0d68cbf48efe57c4adf57a409df4bd57acc1bebd.tar.gz
librpm-tizen-0d68cbf48efe57c4adf57a409df4bd57acc1bebd.tar.bz2
librpm-tizen-0d68cbf48efe57c4adf57a409df4bd57acc1bebd.zip
Use the new problem set iterator where it makes more sense
Diffstat (limited to 'python')
-rw-r--r--python/rpmps-py.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/python/rpmps-py.c b/python/rpmps-py.c
index c003dd8fc..fa7e91ec7 100644
--- a/python/rpmps-py.c
+++ b/python/rpmps-py.c
@@ -129,10 +129,12 @@ PyObject *rpmps_AsList(rpmps ps)
{
PyObject *problems = PyList_New(0);
rpmpsi psi = rpmpsInitIterator(ps);
- while (rpmpsNextIterator(psi) >= 0) {
- PyObject *prob = rpmprob_Wrap(&rpmProblem_Type, rpmpsGetProblem(psi));
- PyList_Append(problems, prob);
- Py_DECREF(prob);
+ rpmProblem prob;
+
+ while ((prob = rpmpsiNext(psi))) {
+ PyObject *pyprob = rpmprob_Wrap(&rpmProblem_Type, prob);
+ PyList_Append(problems, pyprob);
+ Py_DECREF(pyprob);
}
rpmpsFreeIterator(psi);
return problems;