summaryrefslogtreecommitdiff
path: root/apt-pkg/tagfile.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-11-07 21:52:31 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2014-11-08 14:33:25 +0100
commitbc4ccfeb6096fc6f9a74e2abff3abe31261b5df2 (patch)
tree3ac5a8dc90cdbd8dc284c995a071afd492de4deb /apt-pkg/tagfile.h
parent0dc0b42d73ffd08bbdbe08b0678fbaae02364622 (diff)
restore ABI of pkgTagSection
We have a d-pointer available here, so go ahead and use it which also helps in hidding some dirty details here. The "hard" part is keeping the abi for the inlined methods so that they don't break – at least not more than before as much of the point beside a speedup is support for more than 256 fields in a single section.
Diffstat (limited to 'apt-pkg/tagfile.h')
-rw-r--r--apt-pkg/tagfile.h24
1 files changed, 11 insertions, 13 deletions
diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h
index ac6d42089..d09e7046c 100644
--- a/apt-pkg/tagfile.h
+++ b/apt-pkg/tagfile.h
@@ -33,23 +33,22 @@
#endif
class FileFd;
+class pkgTagSectionPrivate;
class pkgTagSection
{
const char *Section;
- struct TagData {
- unsigned int StartTag;
- unsigned int EndTag;
- unsigned int StartValue;
- unsigned int NextInBucket;
-
- TagData(unsigned int const StartTag) : StartTag(StartTag), EndTag(0), StartValue(0), NextInBucket(0) {}
- };
- std::vector<TagData> Tags;
- unsigned int LookupTable[0x100];
+ // We have a limit of 256 tags per section with the old abi
+#if APT_PKG_ABI < 413
+ APT_DEPRECATED unsigned int Indexes[256];
+#endif
+ unsigned int AlphaIndexes[0x100];
+#if APT_PKG_ABI < 413
+ APT_DEPRECATED unsigned int TagCount;
+#endif
// dpointer placeholder (for later in case we need it)
- void *d;
+ pkgTagSectionPrivate *d;
protected:
const char *Stop;
@@ -109,8 +108,7 @@ class pkgTagSection
bool Exists(const char* const Tag);
#endif
- inline void Get(const char *&Start,const char *&Stop,unsigned int I) const
- {Start = Section + Tags[I].StartTag; Stop = Section + Tags[I+1].StartTag;}
+ void Get(const char *&Start,const char *&Stop,unsigned int I) const;
inline void GetSection(const char *&Start,const char *&Stop) const
{