summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcache.h
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2020-02-26 14:51:05 +0000
committerJulian Andres Klode <jak@debian.org>2020-02-26 14:51:05 +0000
commita096b580694cb36f29cdbce8f1db797a08e36709 (patch)
tree8a1bf6106868761042c80e04fdeff1077779ac18 /apt-pkg/pkgcache.h
parentb31040e9c1441a2a7296ce3ff12f5052fc522366 (diff)
parentda01dabb86396a1391f081fa54a806e2d7b62133 (diff)
Merge branch 'pu/cleanups' into 'master'
Cleanup ABI - make stuff virtual, etc See merge request apt-team/apt!106
Diffstat (limited to 'apt-pkg/pkgcache.h')
-rw-r--r--apt-pkg/pkgcache.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h
index f68736ddc..54b4319fb 100644
--- a/apt-pkg/pkgcache.h
+++ b/apt-pkg/pkgcache.h
@@ -386,8 +386,11 @@ struct pkgCache::Header
void SetHashTableSize(unsigned int const sz) { HashTableSize = sz; }
map_stringitem_t GetArchitectures() const { return Architectures; }
void SetArchitectures(map_stringitem_t const idx) { Architectures = idx; }
- map_pointer<Package> * PkgHashTableP() const { return (map_pointer<Package>*) (this + 1); }
- map_pointer<Group> * GrpHashTableP() const { return reinterpret_cast<map_pointer<Group> *>(PkgHashTableP() + GetHashTableSize()); }
+
+#ifdef APT_COMPILING_APT
+ map_pointer<Group> * GrpHashTableP() const { return (map_pointer<Group>*) (this + 1); }
+ map_pointer<Package> * PkgHashTableP() const { return reinterpret_cast<map_pointer<Package> *>(GrpHashTableP() + GetHashTableSize()); }
+#endif
/** \brief Hash of the file (TODO: Rename) */
map_filesize_small_t CacheFileSize;