summaryrefslogtreecommitdiff
path: root/python/depcache.cc
diff options
context:
space:
mode:
authorEmanuele Rocca <ema@debian.org>2008-10-04 21:59:16 +0200
committerEmanuele Rocca <ema@debian.org>2008-10-04 21:59:16 +0200
commit825ead499fa2f385c2cb0876316424b0595c0d3c (patch)
treeb2527f103906b9e9ce63998d1db65d1c7b84fd2f /python/depcache.cc
parent13caebe03934e6e66e9096044181d3aa683b5705 (diff)
parent3bc4cc400ef9a6994e3ed51526811bfa2acd9927 (diff)
downloadpython-apt-825ead499fa2f385c2cb0876316424b0595c0d3c.tar.gz
Merged Michael's changes
Diffstat (limited to 'python/depcache.cc')
-rw-r--r--python/depcache.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/python/depcache.cc b/python/depcache.cc
index 5664a6d8..2446dc71 100644
--- a/python/depcache.cc
+++ b/python/depcache.cc
@@ -197,7 +197,7 @@ static PyObject *PkgDepCacheSetCandidateVer(PyObject *Self,PyObject *Args)
return 0;
pkgCache::PkgIterator &Pkg = GetCpp<pkgCache::PkgIterator>(PackageObj);
- pkgCache::VerIterator I = GetCpp<pkgCache::VerIterator>(VersionObj);
+ pkgCache::VerIterator &I = GetCpp<pkgCache::VerIterator>(VersionObj);
if(I.end()) {
return HandleErrors(Py_BuildValue("b",false));
}
@@ -215,7 +215,9 @@ static PyObject *PkgDepCacheGetCandidateVer(PyObject *Self,PyObject *Args)
return 0;
pkgCache::PkgIterator &Pkg = GetCpp<pkgCache::PkgIterator>(PackageObj);
- pkgCache::VerIterator I = depcache->GetCandidateVer(Pkg);
+ pkgDepCache::StateCache & State = (*depcache)[Pkg];
+ pkgCache::VerIterator I = State.CandidateVerIter(*depcache);
+
if(I.end()) {
Py_INCREF(Py_None);
return Py_None;