X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/8bd0670fc9f71add3441befc1894879cbbdeee1d..f2125ef16eeacb3c029db59ff2f677cfd9703392:/apt-pkg/cacheiterators.h?ds=sidebyside

diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h
index 797e854b6..08eafca0f 100644
--- a/apt-pkg/cacheiterators.h
+++ b/apt-pkg/cacheiterators.h
@@ -31,9 +31,6 @@
 #ifndef PKGLIB_CACHEITERATORS_H
 #define PKGLIB_CACHEITERATORS_H
 
-#ifdef __GNUG__
-#pragma interface "apt-pkg/cacheiterators.h"
-#endif 
 
 // Package Iterator
 class pkgCache::PkgIterator
@@ -99,7 +96,7 @@ class pkgCache::VerIterator
 {
    Version *Ver;
    pkgCache *Owner;
-   
+
    void _dummy();
    
    public:
@@ -107,7 +104,7 @@ class pkgCache::VerIterator
    // Iteration
    void operator ++(int) {if (Ver != Owner->VerP) Ver = Owner->VerP + Ver->NextVer;};
    inline void operator ++() {operator ++(0);};
-   inline bool end() const {return Ver == Owner->VerP?true:false;};
+   inline bool end() const {return Owner == NULL || (Ver == Owner->VerP?true:false);};
    inline void operator =(const VerIterator &B) {Ver = B.Ver; Owner = B.Owner;};
    
    // Comparison
@@ -129,6 +126,7 @@ class pkgCache::VerIterator
    inline const char *Arch() const {return Ver->Arch == 0?0:Owner->StrP + Ver->Arch;};
    inline PkgIterator ParentPkg() const {return PkgIterator(*Owner,Owner->PkgP + Ver->ParentPkg);};
    inline DescIterator DescriptionList() const;
+   DescIterator TranslatedDescription() const;
    inline DepIterator DependsList() const;
    inline PrvIterator ProvidesList() const;
    inline VerFileIterator FileList() const;
@@ -267,7 +265,7 @@ class pkgCache::PrvIterator
    void operator ++(int) {if (Prv != Owner->ProvideP) Prv = Owner->ProvideP +
 	(Type == PrvVer?Prv->NextPkgProv:Prv->NextProvides);};
    inline void operator ++() {operator ++(0);};
-   inline bool end() const {return Prv == Owner->ProvideP?true:false;};
+   inline bool end() const {return Owner == 0 || Prv == Owner->ProvideP?true:false;};
    
    // Comparison
    inline bool operator ==(const PrvIterator &B) const {return Prv == B.Prv;};
@@ -289,6 +287,8 @@ class pkgCache::PrvIterator
    inline PkgIterator OwnerPkg() {return PkgIterator(*Owner,Owner->PkgP + Owner->VerP[Prv->Version].ParentPkg);};
    inline unsigned long Index() const {return Prv - Owner->ProvideP;};
 
+   inline PrvIterator() : Prv(0), Type(PrvVer), Owner(0)  {};
+
    inline PrvIterator(pkgCache &Owner,Provides *Trg,Version *) :
           Prv(Trg), Type(PrvVer), Owner(&Owner) 
    {