summaryrefslogtreecommitdiff
path: root/apt-pkg/deb
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-01-08 20:57:23 +0100
committerJulian Andres Klode <jak@debian.org>2016-01-08 21:08:51 +0100
commite9a1e5f9a37b8ddcdb98f2a0608f262e0863673a (patch)
treea3c08cba476acaacb04c22d09762ff9296847444 /apt-pkg/deb
parent077cb5273b2d6f8d2193e80242cc80419d769a12 (diff)
debListParser: Convert another ParseDepends to StringView
I overlooked this Gbp-Dch: ignore
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r--apt-pkg/deb/deblistparser.cc4
-rw-r--r--apt-pkg/deb/deblistparser.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index baa1e46ec..edd18c5a1 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -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)
diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h
index ad134f8e6..dd60ac50f 100644
--- a/apt-pkg/deb/deblistparser.h
+++ b/apt-pkg/deb/deblistparser.h
@@ -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