From 96511bdc00c2e4c17517b0cc3fce50a08683b2a4 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 1 May 2020 18:08:26 +0300 Subject: Adapt to renaming bpkg::url class to bpkg::manifest_url --- libbrep/package.cxx | 8 ++++---- libbrep/package.hxx | 29 ++++++++++++++--------------- libbrep/types.hxx | 5 +++++ mod/page.cxx | 4 +--- mod/page.hxx | 5 +++-- 5 files changed, 27 insertions(+), 24 deletions(-) diff --git a/libbrep/package.cxx b/libbrep/package.cxx index b985af3..5ec1b69 100644 --- a/libbrep/package.cxx +++ b/libbrep/package.cxx @@ -61,10 +61,10 @@ namespace brep optional ds, optional dt, string ch, - optional ur, - optional du, - optional su, - optional pu, + optional ur, + optional du, + optional su, + optional pu, optional em, optional pe, optional be, diff --git a/libbrep/package.hxx b/libbrep/package.hxx index 59ee589..0ab8413 100644 --- a/libbrep/package.hxx +++ b/libbrep/package.hxx @@ -59,14 +59,14 @@ namespace brep to((?) ? to_string (*(?)) : brep::optional_string ()) \ from((?) ? brep::to_text_type (*(?)) : brep::optional_text_type ()) - // url + // manifest_url // - using bpkg::url; + using bpkg::manifest_url; - #pragma db value(url) definition - #pragma db member(url::value) virtual(string) before \ - get(this.string ()) \ - set(this = brep::url ((?), "" /* comment */)) \ + #pragma db value(manifest_url) definition + #pragma db member(manifest_url::value) virtual(string) before \ + get(this.string ()) \ + set(this = brep::manifest_url ((?), "" /* comment */)) \ column("") // email @@ -356,7 +356,6 @@ namespace brep using upstream_version_type = brep::upstream_version; using priority_type = brep::priority; using license_alternatives_type = brep::license_alternatives; - using url_type = brep::url; using email_type = brep::email; using dependencies_type = brep::dependencies; using requirements_type = brep::requirements; @@ -376,10 +375,10 @@ namespace brep optional description, optional description_type, string changes, - optional, - optional doc_url, - optional src_url, - optional package_url, + optional url, + optional doc_url, + optional src_url, + optional package_url, optional, optional package_email, optional build_email, @@ -449,10 +448,10 @@ namespace brep optional description; // Absent if type is unknown. optional description_type; // Present if description is present. string changes; - optional url; - optional doc_url; - optional src_url; - optional package_url; + optional url; + optional doc_url; + optional src_url; + optional package_url; optional email; optional package_email; optional build_email; diff --git a/libbrep/types.hxx b/libbrep/types.hxx index 9d63b8c..65dfc2d 100644 --- a/libbrep/types.hxx +++ b/libbrep/types.hxx @@ -21,6 +21,7 @@ #include +#include #include #include #include @@ -90,6 +91,10 @@ namespace brep using butl::path_cast; + // + // + using butl::url; + // // using butl::system_clock; diff --git a/mod/page.cxx b/mod/page.cxx index c7dc403..1e317f0 100644 --- a/mod/page.cxx +++ b/mod/page.cxx @@ -14,8 +14,6 @@ #include -#include - #include #include @@ -576,7 +574,7 @@ namespace brep if (icasecmp (url_.scheme, "https") == 0 || icasecmp (url_.scheme, "http") == 0) { - butl::url u (url_); + url u (url_); u.scheme.clear (); s << A(HREF=url_) << u << ~A; diff --git a/mod/page.hxx b/mod/page.hxx index 49d8608..cc9840e 100644 --- a/mod/page.hxx +++ b/mod/page.hxx @@ -378,13 +378,14 @@ namespace brep class TR_URL { public: - TR_URL (const url& u, const char* l = "url"): url_ (u), label_ (l) {} + TR_URL (const manifest_url& u, const char* l = "url") + : url_ (u), label_ (l) {} void operator() (xml::serializer&) const; private: - const url& url_; + const manifest_url& url_; const char* label_; }; -- cgit v1.1