X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/2fcd25a9e26093b8d1228107b5b0019675984114..6755060951828412e19e58afe5361f9ad06e5deb:/apt-pkg/pkgcache.cc diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 2196da03c..23b75a640 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -57,7 +57,7 @@ pkgCache::Header::Header() /* Whenever the structures change the major version should be bumped, whenever the generator changes the minor version should be bumped. */ APT_HEADER_SET(MajorVersion, 10); - APT_HEADER_SET(MinorVersion, 1); + APT_HEADER_SET(MinorVersion, 2); APT_HEADER_SET(Dirty, false); APT_HEADER_SET(HeaderSz, sizeof(pkgCache::Header)); @@ -203,7 +203,7 @@ bool pkgCache::ReMap(bool const &Errorchecks) table (480 used items) */ map_id_t pkgCache::sHash(const string &Str) const { - unsigned long Hash = 0; + uint32_t Hash = 0; for (string::const_iterator I = Str.begin(); I != Str.end(); ++I) Hash = 41 * Hash + tolower_ascii(*I); return Hash % HeaderP->GetHashTableSize(); @@ -211,7 +211,7 @@ map_id_t pkgCache::sHash(const string &Str) const map_id_t pkgCache::sHash(const char *Str) const { - unsigned long Hash = tolower_ascii(*Str); + uint32_t Hash = tolower_ascii(*Str); for (const char *I = Str + 1; *I != 0; ++I) Hash = 41 * Hash + tolower_ascii(*I); return Hash % HeaderP->GetHashTableSize();