aboutsummaryrefslogtreecommitdiff
path: root/bpkg/manifest-utility.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-05-21 21:10:09 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-05-24 17:39:13 +0300
commit3a6c4ab1b6fc79a6a543088553cdd6bc8cb0a1dd (patch)
tree1ca0c3b9ef763276ff45c20a62d2504833e5f67d /bpkg/manifest-utility.hxx
parent1cab4fbd051ee5a71f073446ad5ad1b3d79f1031 (diff)
Adapt to inventing package_name type
Diffstat (limited to 'bpkg/manifest-utility.hxx')
-rw-r--r--bpkg/manifest-utility.hxx15
1 files changed, 8 insertions, 7 deletions
diff --git a/bpkg/manifest-utility.hxx b/bpkg/manifest-utility.hxx
index c22746b..984786d 100644
--- a/bpkg/manifest-utility.hxx
+++ b/bpkg/manifest-utility.hxx
@@ -6,6 +6,7 @@
#define BPKG_MANIFEST_UTILITY_HXX
#include <libbpkg/manifest.hxx>
+#include <libbpkg/package-name.hxx>
#include <bpkg/types.hxx>
#include <bpkg/utility.hxx>
@@ -31,16 +32,16 @@ namespace bpkg
package_scheme
parse_package_scheme (const char*&);
- // Extract and validate the package name and version components from
- // <name>[/<version>].
+ // Extract the package name and version components from <name>[/<version>].
+ // Diagnose invalid components and throw failed.
//
- string
- parse_package_name (const char*);
+ package_name
+ parse_package_name (const char*, bool allow_version = true);
- inline string
- parse_package_name (const string& s)
+ inline package_name
+ parse_package_name (const string& s, bool allow_version = true)
{
- return parse_package_name (s.c_str ());
+ return parse_package_name (s.c_str (), allow_version);
}
// Return empty version if none is specified.