]> git.saurik.com Git - apt.git/commitdiff
debListParser: Convert another ParseDepends to StringView
authorJulian Andres Klode <jak@debian.org>
Fri, 8 Jan 2016 19:57:23 +0000 (20:57 +0100)
committerJulian Andres Klode <jak@debian.org>
Fri, 8 Jan 2016 20:08:51 +0000 (21:08 +0100)
I overlooked this

Gbp-Dch: ignore

apt-pkg/deb/deblistparser.cc
apt-pkg/deb/deblistparser.h

index baa1e46ecb0c6c3fbcd9e945e38c24ec3072f3bd..edd18c5a1dd2a6f11a604c1bef1cd8e9b589014b 100644 (file)
@@ -809,7 +809,7 @@ const char *debListParser::ParseDepends(const char *Start,const char *Stop,
 /* This is the higher level depends parser. It takes a tag and generates
    a complete depends tree for the given version. */
 bool debListParser::ParseDepends(pkgCache::VerIterator &Ver,
-                                const char *Tag,unsigned int Type)
+                                StringView Tag,unsigned int Type)
 {
    const char *Start;
    const char *Stop;
@@ -826,7 +826,7 @@ bool debListParser::ParseDepends(pkgCache::VerIterator &Ver,
 
       Start = ParseDepends(Start, Stop, Package, Version, Op, false, false, false);
       if (Start == 0)
-        return _error->Error("Problem parsing dependency %s",Tag);
+        return _error->Error("Problem parsing dependency %.*s",(int)Tag.length(), Tag.data());
       size_t const found = Package.rfind(':');
 
       if (found == string::npos)
index ad134f8e64739821d814629858b460fe3cb843f2..dd60ac50f3ec367e141968a477a59874c4f5eb45 100644 (file)
@@ -50,8 +50,10 @@ class APT_HIDDEN debListParser : public pkgCacheListParser
    map_filesize_t iOffset;
 
    virtual bool ParseStatus(pkgCache::PkgIterator &Pkg,pkgCache::VerIterator &Ver);
-   bool ParseDepends(pkgCache::VerIterator &Ver,const char *Tag,
+#ifdef APT_PKG_EXPOSE_STRING_VIEW
+   bool ParseDepends(pkgCache::VerIterator &Ver, APT::StringView Tag,
                     unsigned int Type);
+#endif
    bool ParseProvides(pkgCache::VerIterator &Ver);
 
 #ifdef APT_PKG_EXPOSE_STRING_VIEW