]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/cacheiterators.h
releasing 1.1~exp14
[apt.git] / apt-pkg / cacheiterators.h
index 1063d6f9e38920cfd04b60327f64f381c35cd98f..887d2e691e6605e069f2f1480f4246ad0403d80f 100644 (file)
@@ -157,11 +157,7 @@ class pkgCache::PkgIterator: public Iterator<Package, PkgIterator> {
        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. Run as fast as you can to Version.Section().
        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. 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
-       }
+       APT_DEPRECATED inline const char *Section() const;
        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;}
        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;}
@@ -302,7 +298,7 @@ class pkgCache::DepIterator : public Iterator<Dependency, DepIterator> {
                return (S2->CompareOp & pkgCache::Dep::MultiArchImplicit) == pkgCache::Dep::MultiArchImplicit;
        }
        /* This covers additionally negative dependencies, which aren't arch-specific,
                return (S2->CompareOp & pkgCache::Dep::MultiArchImplicit) == pkgCache::Dep::MultiArchImplicit;
        }
        /* This covers additionally negative dependencies, which aren't arch-specific,
-          but change architecture nontheless as a Conflicts: foo does applies for all archs */
+          but change architecture nonetheless as a Conflicts: foo does applies for all archs */
        bool IsImplicit() const APT_PURE;
 
        bool IsSatisfied(VerIterator const &Ver) const APT_PURE;
        bool IsImplicit() const APT_PURE;
 
        bool IsSatisfied(VerIterator const &Ver) const APT_PURE;
@@ -329,8 +325,8 @@ class pkgCache::DepIterator : public Iterator<Dependency, DepIterator> {
           DependencyProxy const * operator->() const { return this; }
           DependencyProxy * operator->() { return this; }
        };
           DependencyProxy const * operator->() const { return this; }
           DependencyProxy * operator->() { return this; }
        };
-       inline DependencyProxy operator->() const {return { S2->Version, S2->Package, S->ID, S2->Type, S2->CompareOp, S->ParentVer, S->DependencyData, S->NextRevDepends, S->NextDepends, S2->NextData };}
-       inline DependencyProxy operator->() {return { S2->Version, S2->Package, S->ID, S2->Type, S2->CompareOp, S->ParentVer, S->DependencyData, S->NextRevDepends, S->NextDepends, S2->NextData };}
+       inline DependencyProxy operator->() const {return (DependencyProxy) { S2->Version, S2->Package, S->ID, S2->Type, S2->CompareOp, S->ParentVer, S->DependencyData, S->NextRevDepends, S->NextDepends, S2->NextData };}
+       inline DependencyProxy operator->() {return (DependencyProxy) { S2->Version, S2->Package, S->ID, S2->Type, S2->CompareOp, S->ParentVer, S->DependencyData, S->NextRevDepends, S->NextDepends, S2->NextData };}
        void ReMap(void const * const oldMap, void const * const newMap)
        {
                Iterator<Dependency, DepIterator>::ReMap(oldMap, newMap);
        void ReMap(void const * const oldMap, void const * const newMap)
        {
                Iterator<Dependency, DepIterator>::ReMap(oldMap, newMap);
@@ -518,5 +514,7 @@ inline pkgCache::VerFileIterator pkgCache::VerIterator::FileList() const
        {return VerFileIterator(*Owner,Owner->VerFileP + S->FileList);}
 inline pkgCache::DescFileIterator pkgCache::DescIterator::FileList() const
        {return DescFileIterator(*Owner,Owner->DescFileP + S->FileList);}
        {return VerFileIterator(*Owner,Owner->VerFileP + S->FileList);}
 inline pkgCache::DescFileIterator pkgCache::DescIterator::FileList() const
        {return DescFileIterator(*Owner,Owner->DescFileP + S->FileList);}
+APT_DEPRECATED inline const char * pkgCache::PkgIterator::Section() const
+       {return S->VersionList == 0 ? 0 : VersionList().Section();}
                                                                        /*}}}*/
 #endif
                                                                        /*}}}*/
 #endif