diff options
author | Michael Vogt <mvo@debian.org> | 2013-08-15 13:39:32 +0200 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2013-08-15 13:39:32 +0200 |
commit | dd4d9729975fc2de37cd69220bc05efb16badc77 (patch) | |
tree | 5af13ab2864135d6d2dba3ef1e2b251c3138ca81 /apt-private/private-list.cc | |
parent | 314a3f88fb099edd74e5899d8d95ef35984e7a24 (diff) |
add PACKAGE_MATCHER_ABI_COMPAT mode for now so that this branch can be merged without breaking ABI
Diffstat (limited to 'apt-private/private-list.cc')
-rw-r--r-- | apt-private/private-list.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/apt-private/private-list.cc b/apt-private/private-list.cc index ac72ce51a..c3a21aafc 100644 --- a/apt-private/private-list.cc +++ b/apt-private/private-list.cc @@ -53,6 +53,9 @@ struct PackageSortAlphabetic } }; +#ifdef PACKAGE_MATCHER_ABI_COMPAT +#define PackageMatcher PackageNameMatchesFnmatch +#endif class PackageNameMatcher : public Matcher { public: @@ -61,11 +64,16 @@ class PackageNameMatcher : public Matcher for(int i=0; patterns[i] != NULL; i++) { std::string pattern = patterns[i]; +#ifdef PACKAGE_MATCHER_ABI_COMPAT + APT::CacheFilter::PackageNameMatchesFnmatch *cachefilter = NULL; + cachefilter = new APT::CacheFilter::PackageNameMatchesFnmatch(pattern); +#else APT::CacheFilter::PackageMatcher *cachefilter = NULL; if(_config->FindB("APT::Cmd::UseRegexp", false) == true) cachefilter = new APT::CacheFilter::PackageNameMatchesRegEx(pattern); else cachefilter = new APT::CacheFilter::PackageNameMatchesFnmatch(pattern); +#endif filters.push_back(cachefilter); } } @@ -88,6 +96,7 @@ class PackageNameMatcher : public Matcher private: std::vector<APT::CacheFilter::PackageMatcher*> filters; std::vector<APT::CacheFilter::PackageMatcher*>::const_iterator J; + #undef PackageMatcher }; |