summaryrefslogtreecommitdiff
path: root/apt-pkg/cacheiterators.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-03-09 01:34:10 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2015-03-16 17:59:31 +0100
commitd61960d9244340956a27f4ca46aecd15cc75e18b (patch)
treec8f7cb33e08c84bcf06fbff39647dc03bc103afb /apt-pkg/cacheiterators.h
parentb0be0e09cfbbcb033eb0b92eaf17ac31a6b9f423 (diff)
parent1a0619ac765cc0b2f4906c96c1a4d7f510569a3f (diff)
merge debian/sid into debian/experimental
Diffstat (limited to 'apt-pkg/cacheiterators.h')
-rw-r--r--apt-pkg/cacheiterators.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h
index f8f4c05ce..fe798799c 100644
--- a/apt-pkg/cacheiterators.h
+++ b/apt-pkg/cacheiterators.h
@@ -161,10 +161,12 @@ class pkgCache::PkgIterator: public Iterator<Package, PkgIterator> {
// Accessors
inline const char *Name() const { return Group().Name(); }
// Versions have sections - and packages can have different versions with different sections
- // so this interface is broken by design. It used to return the section of the "first parsed
- // package stanza", but as this can potentially be anything it now returns the section of the
- // newest version instead (if any). aka: Run as fast as you can to Version.Section().
- APT_DEPRECATED const char *Section() const;
+ // so this interface is broken by design. Run as fast as you can to Version.Section().
+ APT_DEPRECATED inline const char *Section() const {
+ APT_IGNORE_DEPRECATED_PUSH
+ return S->Section == 0?0:Owner->StrP + S->Section;
+ APT_IGNORE_DEPRECATED_POP
+ }
inline bool Purge() const {return S->CurrentState == pkgCache::State::Purge ||
(S->CurrentVer == 0 && S->CurrentState == pkgCache::State::NotInstalled);}
inline const char *Arch() const {return S->Arch == 0?0:Owner->StrP + S->Arch;}