]> git.saurik.com Git - apt.git/commitdiff
[API-Break] rename pkgCache::Package::NextPackage to pkgCache::Package::Next
authorMichael Vogt <mvo@ubuntu.com>
Wed, 18 Jun 2014 07:35:53 +0000 (09:35 +0200)
committerMichael Vogt <mvo@ubuntu.com>
Wed, 18 Jun 2014 07:35:53 +0000 (09:35 +0200)
This is a internal struct not a external interface so the actual
breakage should be small.

apt-pkg/pkgcache.cc
apt-pkg/pkgcache.h
apt-pkg/pkgcachegen.cc

index 93463bcefc57674c517799f5849e24a22976d465..c1a3c0c55d37e0efd0a7378b9bc2c96ee3d81f47 100644 (file)
@@ -206,7 +206,7 @@ pkgCache::PkgIterator pkgCache::SingleArchFindPkg(const string &Name)
 {
    // Look at the hash bucket
    Package *Pkg = PkgP + HeaderP->PkgHashTable[Hash(Name)];
-   for (; Pkg != PkgP; Pkg = PkgP + Pkg->NextPackage)
+   for (; Pkg != PkgP; Pkg = PkgP + Pkg->Next)
    {
       if (unlikely(Pkg->Name == 0))
         continue;
@@ -362,7 +362,7 @@ pkgCache::PkgIterator pkgCache::GrpIterator::FindPkg(string Arch) const {
           (= different packages with same calculated hash),
           so we need to check the name also */
        for (pkgCache::Package *Pkg = PackageList(); Pkg != Owner->PkgP;
-            Pkg = Owner->PkgP + Pkg->NextPackage) {
+            Pkg = Owner->PkgP + Pkg->Next) {
                if (S->Name == Pkg->Name &&
                    stringcasecmp(Arch, Owner->StrP + Pkg->Arch) == 0)
                        return PkgIterator(*Owner, Pkg);
@@ -411,7 +411,7 @@ pkgCache::PkgIterator pkgCache::GrpIterator::NextPkg(pkgCache::PkgIterator const
        if (S->LastPackage == LastPkg.Index())
                return PkgIterator(*Owner, 0);
 
-       return PkgIterator(*Owner, Owner->PkgP + LastPkg->NextPackage);
+       return PkgIterator(*Owner, Owner->PkgP + LastPkg->Next);
 }
                                                                        /*}}}*/
 // GrpIterator::operator ++ - Postfix incr                             /*{{{*/
@@ -438,7 +438,7 @@ void pkgCache::PkgIterator::operator ++(int)
 {
    // Follow the current links
    if (S != Owner->PkgP)
-      S = Owner->PkgP + S->NextPackage;
+      S = Owner->PkgP + S->Next;
 
    // Follow the hash table
    while (S == Owner->PkgP && (HashIndex+1) < (signed)_count(Owner->HeaderP->PkgHashTable))
index 4dd1b33d4ab26b32397f0727892564f39f46d670..43d379ddf1988fe42ae4323969d69a67d07369be 100644 (file)
@@ -388,7 +388,7 @@ struct pkgCache::Package
 
    // Linked list
    /** \brief Link to the next package in the same bucket */
-   map_ptrloc NextPackage;       // Package
+   map_ptrloc Next;       // Package
    /** \brief List of all dependencies on this package */
    map_ptrloc RevDepends;        // Dependency
    /** \brief List of all "packages" this package provide */
index 810f0b0225061597b29e278d0c9c713704940e9c..3671156090434aaa48157ff1b85c622a6eb4f64b 100644 (file)
@@ -639,16 +639,16 @@ bool pkgCacheGenerator::NewPackage(pkgCache::PkgIterator &Pkg,const string &Name
       unsigned long const Hash = Cache.Hash(Name);
       map_ptrloc *insertAt = &Cache.HeaderP->PkgHashTable[Hash];
       while (*insertAt != 0 && strcasecmp(Name.c_str(), Cache.StrP + (Cache.PkgP + *insertAt)->Name) > 0)
-        insertAt = &(Cache.PkgP + *insertAt)->NextPackage;
-      Pkg->NextPackage = *insertAt;
+        insertAt = &(Cache.PkgP + *insertAt)->Next;
+      Pkg->Next = *insertAt;
       *insertAt = Package;
    }
    else // Group the Packages together
    {
       // this package is the new last package
       pkgCache::PkgIterator LastPkg(Cache, Cache.PkgP + Grp->LastPackage);
-      Pkg->NextPackage = LastPkg->NextPackage;
-      LastPkg->NextPackage = Package;
+      Pkg->Next = LastPkg->Next;
+      LastPkg->Next = Package;
    }
    Grp->LastPackage = Package;