summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2016-06-03 00:15:54 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2016-06-03 00:15:54 +0100
commit4832485b49b93b309579e38ff8b1d29e8bad5f5b (patch)
treee48f305bd31f53a3ac0610b70b31ab703e3bba96
parentCopy-free getRange in ebuild cache parser (diff)
downloadgentoobrowse-api-4832485b49b93b309579e38ff8b1d29e8bad5f5b.tar.bz2
gentoobrowse-api-4832485b49b93b309579e38ff8b1d29e8bad5f5b.tar.xz
gentoobrowse-api-4832485b49b93b309579e38ff8b1d29e8bad5f5b.zip
Support character range input to dependency scanner
-rw-r--r--gentoobrowse-api/service/depend.cpp8
-rw-r--r--gentoobrowse-api/service/depend.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/gentoobrowse-api/service/depend.cpp b/gentoobrowse-api/service/depend.cpp
index 3d325d7..0a0dd4d 100644
--- a/gentoobrowse-api/service/depend.cpp
+++ b/gentoobrowse-api/service/depend.cpp
@@ -82,6 +82,14 @@ namespace Portage {
d.extract(s.c_str(), s.length());
return d.ds;
}
+
+ std::vector<Gentoo::DependencyPtr>
+ Depend::parse(const char * begin, const char * end)
+ {
+ Depend d;
+ d.extract(begin, end - begin);
+ return d.ds;
+ }
}
}
diff --git a/gentoobrowse-api/service/depend.h b/gentoobrowse-api/service/depend.h
index 487c6da..c384a11 100644
--- a/gentoobrowse-api/service/depend.h
+++ b/gentoobrowse-api/service/depend.h
@@ -15,6 +15,7 @@ namespace Portage {
public:
static std::vector<Gentoo::DependencyPtr> parse(const std::string &);
+ static std::vector<Gentoo::DependencyPtr> parse(const char *, const char *);
std::vector<Gentoo::DependencyPtr> ds;
};
}