summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcache.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-07-15 13:21:21 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-08-10 17:27:58 +0200
commit4dc77823d360158d6870a5710cc8c17064f1308f (patch)
treec26b1040c6b6cc059411372ef81b6b030e18013c /apt-pkg/pkgcache.h
parentb291aa59ee63983204d8aeb166c388b1f97edce7 (diff)
remove the compatibility markers for 4.13 abi
We aren't and we will not be really compatible again with the previous stable abi, so lets drop these markers (which never made it into a released version) for good as they have outlived their intend already. Git-Dch: Ignore
Diffstat (limited to 'apt-pkg/pkgcache.h')
-rw-r--r--apt-pkg/pkgcache.h74
1 files changed, 15 insertions, 59 deletions
diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h
index b3a2e3184..3fa815c15 100644
--- a/apt-pkg/pkgcache.h
+++ b/apt-pkg/pkgcache.h
@@ -85,45 +85,18 @@
using std::string;
#endif
-#if APT_PKG_ABI >= 413
+// size of (potentially big) files like debs or the install size of them
+typedef uint64_t map_filesize_t;
// storing file sizes of indexes, which are way below 4 GB for now
-typedef uint32_t map_filesize_t;
-typedef map_filesize_t should_be_map_filesize_t;
-#else
-typedef unsigned long map_filesize_t;
-typedef unsigned int should_be_map_filesize_t;
-#endif
-#if APT_PKG_ABI >= 413
+typedef uint32_t map_filesize_small_t;
// each package/group/dependency gets an id
typedef uint32_t map_id_t;
-typedef map_id_t should_be_map_id_t;
-#else
-typedef unsigned long map_id_t;
-typedef unsigned int should_be_map_id_t;
-#endif
-#if APT_PKG_ABI >= 413
// some files get an id, too, but in far less absolute numbers
typedef uint16_t map_fileid_t;
-typedef map_fileid_t should_be_map_fileid_t;
-#else
-typedef unsigned long map_fileid_t;
-typedef unsigned int should_be_map_fileid_t;
-#endif
-#if APT_PKG_ABI >= 413
// relative pointer from cache start
typedef uint32_t map_pointer_t;
-#else
-typedef unsigned int map_pointer_t;
-#endif
// same as the previous, but documented to be to a string item
typedef map_pointer_t map_stringitem_t;
-#if APT_PKG_ABI >= 413
-typedef uint64_t should_be_uint64_t;
-typedef uint64_t should_be_uint64_small_t;
-#else
-typedef unsigned long long should_be_uint64_t;
-typedef unsigned long should_be_uint64_small_t;
-#endif
class pkgVersioningSystem;
class pkgCache /*{{{*/
@@ -342,17 +315,12 @@ struct pkgCache::Header
/** \brief index of the first ReleaseFile structure */
map_pointer_t RlsFileList;
-#if APT_PKG_ABI < 413
- APT_DEPRECATED map_pointer_t StringList;
-#endif
/** \brief String representing the version system used */
map_pointer_t VerSysName;
/** \brief native architecture the cache was built against */
map_pointer_t Architecture;
-#if APT_PKG_ABI >= 413
/** \brief all architectures the cache was built against */
map_pointer_t Architectures;
-#endif
/** \brief The maximum size of a raw entry from the original Package file */
map_filesize_t MaxVerFileSize;
/** \brief The maximum size of a raw entry from the original Translation file */
@@ -378,26 +346,16 @@ struct pkgCache::Header
In the PkgHashTable is it possible that multiple packages have the same name -
these packages are stored as a sequence in the list.
The size of both tables is the same. */
-#if APT_PKG_ABI >= 413
unsigned int HashTableSize;
unsigned int GetHashTableSize() const { return HashTableSize; }
void SetHashTableSize(unsigned int const sz) { HashTableSize = sz; }
map_pointer_t GetArchitectures() const { return Architectures; }
void SetArchitectures(map_pointer_t const idx) { Architectures = idx; }
-#else
- // BEWARE: these tables are pretty much empty and just here for abi compat
- map_ptrloc PkgHashTable[2*1048];
- map_ptrloc GrpHashTable[2*1048];
- unsigned int GetHashTableSize() const { return PkgHashTable[0]; }
- void SetHashTableSize(unsigned int const sz) { PkgHashTable[0] = sz; }
- map_pointer_t GetArchitectures() const { return PkgHashTable[1]; }
- void SetArchitectures(map_pointer_t const idx) { PkgHashTable[1] = idx; }
-#endif
map_pointer_t * PkgHashTableP() const { return (map_pointer_t*) (this + 1); }
map_pointer_t * GrpHashTableP() const { return PkgHashTableP() + GetHashTableSize(); }
/** \brief Size of the complete cache file */
- should_be_uint64_small_t CacheFileSize;
+ map_filesize_small_t CacheFileSize;
bool CheckSizes(Header &Against) const APT_PURE;
Header();
@@ -423,7 +381,7 @@ struct pkgCache::Group
/** \brief Link to the next Group */
map_pointer_t Next; // Group
/** \brief unique sequel ID */
- should_be_map_id_t ID;
+ map_id_t ID;
};
/*}}}*/
@@ -495,7 +453,7 @@ struct pkgCache::Package
This allows clients to create an array of size PackageCount and use it to store
state information for the package map. For instance the status file emitter uses
this to track which packages have been emitted already. */
- should_be_map_id_t ID;
+ map_id_t ID;
/** \brief some useful indicators of the package's state */
unsigned long Flags;
};
@@ -537,7 +495,7 @@ struct pkgCache::ReleaseFile
/** \brief Link to the next ReleaseFile in the Cache */
map_pointer_t NextFile;
/** \brief unique sequel ID */
- should_be_map_fileid_t ID;
+ map_fileid_t ID;
};
/*}}}*/
// Package File structure /*{{{*/
@@ -576,7 +534,7 @@ struct pkgCache::PackageFile
/** \brief Link to the next PackageFile in the Cache */
map_pointer_t NextFile; // PackageFile
/** \brief unique sequel ID */
- should_be_map_fileid_t ID;
+ map_fileid_t ID;
};
/*}}}*/
// VerFile structure /*{{{*/
@@ -591,7 +549,7 @@ struct pkgCache::VerFile
/** \brief next step in the linked list */
map_pointer_t NextFile; // PkgVerFile
/** \brief position in the package file */
- should_be_map_filesize_t Offset; // File offset
+ map_filesize_t Offset; // File offset
/** @TODO document pkgCache::VerFile::Size */
map_filesize_t Size;
};
@@ -605,7 +563,7 @@ struct pkgCache::DescFile
/** \brief next step in the linked list */
map_pointer_t NextFile; // PkgVerFile
/** \brief position in the file */
- should_be_map_filesize_t Offset; // File offset
+ map_filesize_t Offset; // File offset
/** @TODO document pkgCache::DescFile::Size */
map_filesize_t Size;
};
@@ -622,14 +580,12 @@ struct pkgCache::Version
map_stringitem_t VerStr;
/** \brief section this version is filled in */
map_stringitem_t Section;
-#if APT_PKG_ABI >= 413
/** \brief source package name this version comes from
Always contains the name, even if it is the same as the binary name */
map_stringitem_t SourcePkgName;
/** \brief source version this version comes from
Always contains the version string, even if it is the same as the binary version */
map_stringitem_t SourceVerStr;
-#endif
/** \brief Multi-Arch capabilities of a package version */
enum VerMultiArch { None = 0, /*!< is the default and doesn't trigger special behaviour */
@@ -668,16 +624,16 @@ struct pkgCache::Version
/** \brief archive size for this version
For Debian this is the size of the .deb file. */
- should_be_uint64_t Size; // These are the .deb size
+ map_filesize_t Size; // These are the .deb size
/** \brief uncompressed size for this version */
- should_be_uint64_t InstalledSize;
+ map_filesize_t InstalledSize;
/** \brief characteristic value representing this version
No two packages in existence should have the same VerStr
and Hash with different contents. */
unsigned short Hash;
/** \brief unique sequel ID */
- should_be_map_id_t ID;
+ map_id_t ID;
/** \brief parsed priority value */
unsigned char Priority;
};
@@ -705,7 +661,7 @@ struct pkgCache::Description
map_pointer_t ParentPkg; // Package
/** \brief unique sequel ID */
- should_be_map_id_t ID;
+ map_id_t ID;
};
/*}}}*/
// Dependency structure /*{{{*/
@@ -745,7 +701,7 @@ struct pkgCache::Dependency
map_pointer_t NextDepends; // Dependency
/** \brief unique sequel ID */
- should_be_map_id_t ID;
+ map_id_t ID;
};
/*}}}*/
// Provides structure /*{{{*/