[Debtags-commits] [svn] r873 - in libdebtags1/trunk: . debtags
Enrico Zini
debtags-commits@lists.alioth.debian.org
Fri, 10 Jun 2005 17:09:20 +0000
Author: enrico
Date: Fri Jun 10 17:09:19 2005
New Revision: 873
Modified:
libdebtags1/trunk/TODO
libdebtags1/trunk/debtags/DebtagsSimple.cc
Log:
DebtagsSimple now returns an empty tagset instead of a segfault when querying for non-existing packages
TODO updates
Modified: libdebtags1/trunk/TODO
==============================================================================
--- libdebtags1/trunk/TODO (original)
+++ libdebtags1/trunk/TODO Fri Jun 10 17:09:19 2005
@@ -1,5 +1,12 @@
*** TODO for libdebtags
+The Debtags::Matcher is a good candidate for this one, having the same
+implementation like the match function. With this the code in
+TagSet::getFiltered could be implemented using a the copy_if() algorithm.
+Uhh... the above is hard to read. I mean the operator() could be added to the
+Debtags::Matcher() - where it could be used in std algorithms.
+
+
- perl bindings crash at shutdown: it looks like #186104: check what it was,
and check how it has been corrected
- Does not seem to be the case:
Modified: libdebtags1/trunk/debtags/DebtagsSimple.cc
==============================================================================
--- libdebtags1/trunk/debtags/DebtagsSimple.cc (original)
+++ libdebtags1/trunk/debtags/DebtagsSimple.cc Fri Jun 10 17:09:19 2005
@@ -22,7 +22,10 @@
TagSet DebtagsSimple::getTags(const std::string& package) const
{
Package pkg = _packagedb.getPackage(package);
- return _tagDB.getTags(pkg);
+ if (pkg)
+ return _tagDB.getTags(pkg);
+ else
+ return TagSet();
}
PackageSet DebtagsSimple::getPackages(const Tag& tag) const