From 549fb4393ed4e95fa8fba16dfc1f00c8df64fbcf Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 22 Oct 2007 13:37:02 +0300 Subject: Use rpmtsGet/SetDBMode() to eliminate needs for _RPMTS_INTERNAL --- python/rpmts-py.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'python') diff --git a/python/rpmts-py.c b/python/rpmts-py.c index 756cfbe5c..b0eaf4d66 100644 --- a/python/rpmts-py.c +++ b/python/rpmts-py.c @@ -618,14 +618,16 @@ fprintf(stderr, "*** rpmts_Rollback(%p) ts %p\n", s, s->ts); static PyObject * rpmts_OpenDB(rpmtsObject * s) { + int dbmode; if (_rpmts_debug) fprintf(stderr, "*** rpmts_OpenDB(%p) ts %p\n", s, s->ts); - if (s->ts->dbmode == -1) - s->ts->dbmode = O_RDONLY; + dbmode = rpmtsGetDBMode(s->ts); + if (dbmode == -1) + dbmode = O_RDONLY; - return Py_BuildValue("i", rpmtsOpenDB(s->ts, s->ts->dbmode)); + return Py_BuildValue("i", rpmtsOpenDB(s->ts, dbmode)); } /** \ingroup py_c @@ -639,7 +641,7 @@ if (_rpmts_debug) fprintf(stderr, "*** rpmts_CloseDB(%p) ts %p\n", s, s->ts); rc = rpmtsCloseDB(s->ts); - s->ts->dbmode = -1; /* XXX disable lazy opens */ + rpmtsSetDBMode(s->ts, -1); /* XXX disable lazy opens */ return Py_BuildValue("i", rc); } -- cgit v1.2.3