From 3809194b662f48733916e6248cd0c141f281313d Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 29 Sep 2014 15:41:12 +0200 Subject: mark private methods as hidden We are the only possible users of private methods, so we are also the only users who can potentially export them via using them in inline methods. The point is: We don't need these symbols exported if we don't do this, so marking them as hidden removes some methods from the API without breaking anything as nobody could have used them. Git-Dch: Ignore --- apt-pkg/deb/debindexfile.cc | 6 +++--- apt-pkg/deb/debindexfile.h | 25 +++++++++++++------------ apt-pkg/deb/debmetaindex.h | 2 +- apt-pkg/deb/debsystem.h | 2 +- apt-pkg/deb/dpkgpm.h | 2 +- 5 files changed, 19 insertions(+), 18 deletions(-) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc index f90731dd2..9897df53d 100644 --- a/apt-pkg/deb/debindexfile.cc +++ b/apt-pkg/deb/debindexfile.cc @@ -131,7 +131,7 @@ string debSourcesIndex::Info(const char *Type) const // SourcesIndex::Index* - Return the URI to the index files /*{{{*/ // --------------------------------------------------------------------- /* */ -inline string debSourcesIndex::IndexFile(const char *Type) const +string debSourcesIndex::IndexFile(const char *Type) const { string s = URItoFileName(IndexURI(Type)); @@ -265,7 +265,7 @@ string debPackagesIndex::Info(const char *Type) const // PackagesIndex::Index* - Return the URI to the index files /*{{{*/ // --------------------------------------------------------------------- /* */ -inline string debPackagesIndex::IndexFile(const char *Type) const +string debPackagesIndex::IndexFile(const char *Type) const { string s =_config->FindDir("Dir::State::lists") + URItoFileName(IndexURI(Type)); @@ -421,7 +421,7 @@ debTranslationsIndex::debTranslationsIndex(string URI,string Dist,string Section // TranslationIndex::Trans* - Return the URI to the translation files /*{{{*/ // --------------------------------------------------------------------- /* */ -inline string debTranslationsIndex::IndexFile(const char *Type) const +string debTranslationsIndex::IndexFile(const char *Type) const { string s =_config->FindDir("Dir::State::lists") + URItoFileName(IndexURI(Type)); diff --git a/apt-pkg/deb/debindexfile.h b/apt-pkg/deb/debindexfile.h index 18322dc1b..2e3ff5451 100644 --- a/apt-pkg/deb/debindexfile.h +++ b/apt-pkg/deb/debindexfile.h @@ -65,10 +65,10 @@ class debPackagesIndex : public pkgIndexFile std::string Section; std::string Architecture; - std::string Info(const char *Type) const; - std::string IndexFile(const char *Type) const; - std::string IndexURI(const char *Type) const; - + APT_HIDDEN std::string Info(const char *Type) const; + APT_HIDDEN std::string IndexFile(const char *Type) const; + APT_HIDDEN std::string IndexURI(const char *Type) const; + public: virtual const Type *GetType() const APT_CONST; @@ -102,11 +102,11 @@ class debTranslationsIndex : public pkgIndexFile std::string Section; const char * const Language; - std::string Info(const char *Type) const; - std::string IndexFile(const char *Type) const; - std::string IndexURI(const char *Type) const; + APT_HIDDEN std::string Info(const char *Type) const; + APT_HIDDEN std::string IndexFile(const char *Type) const; + APT_HIDDEN std::string IndexURI(const char *Type) const; - inline std::string TranslationFile() const {return std::string("Translation-").append(Language);}; + APT_HIDDEN std::string TranslationFile() const {return std::string("Translation-").append(Language);}; public: @@ -136,10 +136,10 @@ class debSourcesIndex : public pkgIndexFile std::string Dist; std::string Section; - std::string Info(const char *Type) const; - std::string IndexFile(const char *Type) const; - std::string IndexURI(const char *Type) const; - + APT_HIDDEN std::string Info(const char *Type) const; + APT_HIDDEN std::string IndexFile(const char *Type) const; + APT_HIDDEN std::string IndexURI(const char *Type) const; + public: virtual const Type *GetType() const APT_CONST; @@ -214,6 +214,7 @@ class debDscFileIndex : public pkgIndexFile class debDebianSourceDirIndex : public debDscFileIndex { + public: virtual const Type *GetType() const APT_CONST; }; diff --git a/apt-pkg/deb/debmetaindex.h b/apt-pkg/deb/debmetaindex.h index 7091c198f..399543953 100644 --- a/apt-pkg/deb/debmetaindex.h +++ b/apt-pkg/deb/debmetaindex.h @@ -36,7 +36,7 @@ class debReleaseIndex : public metaIndex { /** \brief dpointer placeholder (for later in case we need it) */ void *d; std::map > ArchEntries; - enum { ALWAYS_TRUSTED, NEVER_TRUSTED, CHECK_TRUST } Trusted; + enum APT_HIDDEN { ALWAYS_TRUSTED, NEVER_TRUSTED, CHECK_TRUST } Trusted; public: diff --git a/apt-pkg/deb/debsystem.h b/apt-pkg/deb/debsystem.h index a945f68fb..226cd60bf 100644 --- a/apt-pkg/deb/debsystem.h +++ b/apt-pkg/deb/debsystem.h @@ -29,7 +29,7 @@ class debSystem : public pkgSystem { // private d-pointer debSystemPrivate *d; - bool CheckUpdates(); + APT_HIDDEN bool CheckUpdates(); public: diff --git a/apt-pkg/deb/dpkgpm.h b/apt-pkg/deb/dpkgpm.h index 6bd6ce0ee..2a6e7e004 100644 --- a/apt-pkg/deb/dpkgpm.h +++ b/apt-pkg/deb/dpkgpm.h @@ -52,7 +52,7 @@ class pkgDPkgPM : public pkgPackageManager needs to declare a Replaces on the disappeared package. \param pkgname Name of the package that disappeared */ - void handleDisappearAction(std::string const &pkgname); + APT_HIDDEN void handleDisappearAction(std::string const &pkgname); protected: int pkgFailures; -- cgit v1.2.3 From 30b45652d6b8c710e7a5e7e95cfa431a5df4462c Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 3 Oct 2014 00:18:53 +0200 Subject: rename StringType VERSION to VERSIONNUMBER aptitude has a define for VERSION, so to not generate a FTBFS we just rename our enum element to a slightly less generic name. Git-Dch: Ignore --- apt-pkg/deb/deblistparser.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index 103b126de..63414c944 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -162,7 +162,7 @@ bool debListParser::NewVersion(pkgCache::VerIterator &Ver) std::string const version(Open + 1, (Close - Open) - 1); if (version != Ver.VerStr()) { - map_stringitem_t const idx = StoreString(pkgCacheGenerator::VERSION, version); + map_stringitem_t const idx = StoreString(pkgCacheGenerator::VERSIONNUMBER, version); Ver->SourceVerStr = idx; } } @@ -953,7 +953,7 @@ bool debListParser::LoadReleaseInfo(pkgCache::PkgFileIterator &FileI, } APT_INRELEASE(MIXED, "Suite", FileI->Archive) APT_INRELEASE(MIXED, "Component", FileI->Component) - APT_INRELEASE(VERSION, "Version", FileI->Version) + APT_INRELEASE(VERSIONNUMBER, "Version", FileI->Version) APT_INRELEASE(MIXED, "Origin", FileI->Origin) APT_INRELEASE(MIXED, "Codename", FileI->Codename) APT_INRELEASE(MIXED, "Label", FileI->Label) -- cgit v1.2.3