summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2007-09-17 14:41:22 +0300
committerPanu Matilainen <pmatilai@redhat.com>2007-09-17 14:41:22 +0300
commitf35edd40321c2072ae5e4bcf81e6c63f1338e151 (patch)
treec07fe9e144c2a3d915c20361fc02d6fd3c7ccb4e /python
parentf4296e723b14c6ed1831efddbf93204160dd80e7 (diff)
downloadrpm-f35edd40321c2072ae5e4bcf81e6c63f1338e151.tar.gz
rpm-f35edd40321c2072ae5e4bcf81e6c63f1338e151.tar.bz2
rpm-f35edd40321c2072ae5e4bcf81e6c63f1338e151.zip
Use rpmtsGetRdb() instead of poking ts internals
Diffstat (limited to 'python')
-rw-r--r--python/rpmts-py.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/python/rpmts-py.c b/python/rpmts-py.c
index ad4d85c26..37d13b58a 100644
--- a/python/rpmts-py.c
+++ b/python/rpmts-py.c
@@ -17,7 +17,7 @@
#include "rpmte-py.h"
#include "spec-py.h"
-#define _RPMTS_INTERNAL /* XXX for ts->rdb, ts->availablePackage */
+#define _RPMTS_INTERNAL /* XXX for ts->availablePackage */
#include "rpmts-py.h"
#include "debug.h"
@@ -1269,9 +1269,9 @@ fprintf(stderr, "*** rpmts_Match(%p) ts %p\n", s, s->ts);
/* XXX If not already opened, open the database O_RDONLY now. */
/* XXX FIXME: lazy default rdonly open also done by rpmtsInitIterator(). */
- if (s->ts->rdb == NULL) {
+ if (rpmtsGetRdb(s->ts) == NULL) {
int rc = rpmtsOpenDB(s->ts, O_RDONLY);
- if (rc || s->ts->rdb == NULL) {
+ if (rc || rpmtsGetRdb(s->ts) == NULL) {
PyErr_SetString(PyExc_TypeError, "rpmdb open failed");
return NULL;
}
@@ -1380,7 +1380,7 @@ static void rpmts_dealloc(rpmtsObject * s)
{
if (_rpmts_debug)
-fprintf(stderr, "%p -- ts %p db %p\n", s, s->ts, s->ts->rdb);
+fprintf(stderr, "%p -- ts %p db %p\n", s, s->ts, rpmtsGetRdb(s->ts));
s->ts = rpmtsFree(s->ts);
if (s->scriptFd) Fclose(s->scriptFd);
@@ -1433,7 +1433,7 @@ static int rpmts_init(rpmtsObject * s, PyObject *args, PyObject *kwds)
static void rpmts_free(rpmtsObject * s)
{
if (_rpmts_debug)
-fprintf(stderr, "%p -- ts %p db %p\n", s, s->ts, s->ts->rdb);
+fprintf(stderr, "%p -- ts %p db %p\n", s, s->ts, rpmtsGetRdb(s->ts-);
s->ts = rpmtsFree(s->ts);
if (s->scriptFd)
@@ -1486,7 +1486,7 @@ static PyObject * rpmts_new(PyTypeObject * subtype, PyObject *args, PyObject *kw
s->tsiFilter = 0;
if (_rpmts_debug)
- fprintf(stderr, "%p ++ ts %p db %p\n", s, s->ts, s->ts->rdb);
+ fprintf(stderr, "%p ++ ts %p db %p\n", s, s->ts, rpmtsGetRdb(s->ts);
return (PyObject *)s;
}