From: Panu Matilainen Date: Fri, 19 Oct 2007 09:28:30 +0000 (+0300) Subject: Use rpmProblem access methods instead of direct access to the struct X-Git-Tag: tznext/4.11.0.1.tizen20130304~5152 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1e74fccef78dd4f5ad80d853646af678d7f6390b;p=tools%2Flibrpm-tizen.git Use rpmProblem access methods instead of direct access to the struct --- diff --git a/python/rpmts-py.c b/python/rpmts-py.c index ac7a95c..cc8a17a 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); }