aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-05-01 18:07:07 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-05-01 18:07:07 +0300
commit41c2026a10be5fc73986eba037fac6993d5cdb64 (patch)
treeeb86686b69e814e4cbcd8ea4968acaa931a55c2a
parent95ca09c8b51dd3c1fe630a1c65df13ca2e404acc (diff)
Rename bpkg::url class to bpkg::manifest_url not to clash with butl::url in some contexts
-rw-r--r--libbpkg/manifest.cxx21
-rw-r--r--libbpkg/manifest.hxx15
2 files changed, 18 insertions, 18 deletions
diff --git a/libbpkg/manifest.cxx b/libbpkg/manifest.cxx
index c1c541f..9caa229 100644
--- a/libbpkg/manifest.cxx
+++ b/libbpkg/manifest.cxx
@@ -606,10 +606,12 @@ namespace bpkg
return *this;
}
- // url
+ // manifest_url
//
- url::
- url (const std::string& u, std::string c): butl::url (u), comment (move (c))
+ manifest_url::
+ manifest_url (const std::string& u, std::string c)
+ : url (u),
+ comment (move (c))
{
if (rootless)
throw invalid_argument ("rootless URL");
@@ -1643,18 +1645,19 @@ namespace bpkg
r = bpkg::parse_email (nv, what, source_name, empty);
};
- auto parse_url = [&bad_value] (const string& v, const char* what) -> url
+ auto parse_url = [&bad_value] (const string& v,
+ const char* what) -> manifest_url
{
auto p (parser::split_comment (v));
if (v.empty ())
bad_value (string ("empty ") + what + " url");
- url r;
+ manifest_url r;
try
{
- r = url (p.first, move (p.second));
+ r = manifest_url (p.first, move (p.second));
}
catch (const invalid_argument& e)
{
@@ -3270,7 +3273,7 @@ namespace bpkg
{
try
{
- return path_type (butl::url::decode (path));
+ return path_type (url::decode (path));
}
catch (const invalid_path&)
{
@@ -3281,8 +3284,6 @@ namespace bpkg
repository_url_traits::string_type repository_url_traits::
translate_path (const path_type& path)
{
- using butl::url;
-
// If the path is absolute then this is a local URL object and the file://
// URL notation is being produced. Thus, on POSIX we need to make the path
// relative (to the authority "root"). On Windows the path should stay
@@ -3377,7 +3378,7 @@ namespace bpkg
typed_repository_url::
typed_repository_url (const string& s)
{
- using traits = butl::url::traits_type;
+ using traits = url::traits_type;
if (traits::find (s) == 0) // Looks like a non-rootless URL?
{
diff --git a/libbpkg/manifest.hxx b/libbpkg/manifest.hxx
index 05b6dfc..b82b87e 100644
--- a/libbpkg/manifest.hxx
+++ b/libbpkg/manifest.hxx
@@ -276,7 +276,7 @@ namespace bpkg
//
// See libbutl/url.mxx for details.
//
- class url: public butl::url
+ class manifest_url: public butl::url
{
public:
std::string comment;
@@ -284,9 +284,9 @@ namespace bpkg
// Throw invalid_argument on parsing or constraints checking error.
//
explicit
- url (const std::string& u, std::string c = "");
+ manifest_url (const std::string& u, std::string c = "");
- url () = default;
+ manifest_url () = default;
};
// email
@@ -673,7 +673,6 @@ namespace bpkg
public:
using version_type = bpkg::version;
using priority_type = bpkg::priority;
- using url_type = bpkg::url;
using email_type = bpkg::email;
package_name name;
@@ -694,10 +693,10 @@ namespace bpkg
butl::optional<text_file> description;
butl::optional<std::string> description_type;
butl::small_vector<text_file, 1> changes;
- butl::optional<url_type> url;
- butl::optional<url_type> doc_url;
- butl::optional<url_type> src_url;
- butl::optional<url_type> package_url;
+ butl::optional<manifest_url> url;
+ butl::optional<manifest_url> doc_url;
+ butl::optional<manifest_url> src_url;
+ butl::optional<manifest_url> package_url;
butl::optional<email_type> email;
butl::optional<email_type> package_email;
butl::optional<email_type> build_email;