summaryrefslogtreecommitdiff
path: root/python/rpmts-py.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2007-10-19 12:28:30 +0300
committerPanu Matilainen <pmatilai@redhat.com>2007-10-19 12:28:30 +0300
commit1e74fccef78dd4f5ad80d853646af678d7f6390b (patch)
tree1531403baff4babdad161a642cd92d0a4e035d4b /python/rpmts-py.c
parent494c56e94ae9bbdcec46b746dc6837de42c890b7 (diff)
downloadrpm-1e74fccef78dd4f5ad80d853646af678d7f6390b.tar.gz
rpm-1e74fccef78dd4f5ad80d853646af678d7f6390b.tar.bz2
rpm-1e74fccef78dd4f5ad80d853646af678d7f6390b.zip
Use rpmProblem access methods instead of direct access to the struct
Diffstat (limited to 'python/rpmts-py.c')
-rw-r--r--python/rpmts-py.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/python/rpmts-py.c b/python/rpmts-py.c
index ac7a95ce2..cc8a17ab3 100644
--- a/python/rpmts-py.c
+++ b/python/rpmts-py.c
@@ -403,18 +403,19 @@ fprintf(stderr, "*** rpmts_Check(%p) ts %p cb %p\n", s, s->ts, cbInfo.cb);
conflicts[i].suggestedPkgs[0] : Py_None,
conflicts[i].sense);
#else
- char * byName, * byVersion, * byRelease, *byArch;
- char * needsName, * needsOP, * needsVersion;
+ const char * byName, * needsName;
+ char * byVersion, * byRelease, *byArch;
+ char * needsOP, * needsVersion;
int needsFlags, sense;
fnpyKey key;
p = rpmpsProblem(psi);
/* XXX autorelocated i386 on ia64, fix system-config-packages! */
- if (p->type == RPMPROB_BADRELOCATE)
+ if (rpmProblemGetType(p) == RPMPROB_BADRELOCATE)
continue;
- byName = p->pkgNEVR;
+ byName = rpmProblemGetPkgNEVR(p);
if ((byArch= strrchr(byName, '.')) != NULL)
*byArch++ = '\0';
if ((byRelease = strrchr(byName, '-')) != NULL)
@@ -422,9 +423,9 @@ fprintf(stderr, "*** rpmts_Check(%p) ts %p cb %p\n", s, s->ts, cbInfo.cb);
if ((byVersion = strrchr(byName, '-')) != NULL)
*byVersion++ = '\0';
- key = p->key;
+ key = rpmProblemGetKey(p);
- needsName = p->altNEVR;
+ needsName = rpmProblemGetAltNEVR(p);
if (needsName[1] == ' ') {
sense = (needsName[0] == 'C')
? RPMDEP_SENSE_CONFLICTS : RPMDEP_SENSE_REQUIRES;
@@ -1127,9 +1128,9 @@ fprintf(stderr, "*** rpmts_Run(%p) ts %p ignore %x\n", s, s->ts, s->ignoreSet);
while (rpmpsNextIterator(psi) >= 0) {
rpmProblem p = rpmpsProblem(psi);
PyObject * prob = Py_BuildValue("s(isN)", rpmProblemString(p),
- p->type,
- p->str1,
- PyLong_FromLongLong(p->ulong1));
+ rpmProblemGetType(p),
+ rpmProblemGetStr(p),
+ PyLong_FromLongLong(rpmProblemGetLong(p)));
PyList_Append(list, prob);
Py_DECREF(prob);
}