aboutsummaryrefslogtreecommitdiffstats
path: root/src/uri.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/uri.c')
-rw-r--r--src/uri.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/uri.c b/src/uri.c
index 01384072..f40fde83 100644
--- a/src/uri.c
+++ b/src/uri.c
@@ -94,7 +94,7 @@ serd_uri_string_has_scheme(const char* utf8)
}
SerdStatus
-serd_uri_parse(const char* utf8, SerdURI* out)
+serd_uri_parse(const char* utf8, SerdURIView* out)
{
*out = SERD_URI_NULL;
@@ -306,7 +306,7 @@ merge(SerdStringView* base, SerdStringView* path)
/// See http://tools.ietf.org/html/rfc3986#section-5.2.2
void
-serd_uri_resolve(const SerdURI* r, const SerdURI* base, SerdURI* t)
+serd_uri_resolve(const SerdURIView* r, const SerdURIView* base, SerdURIView* t)
{
if (!base->scheme.len) {
*t = *r; // Don't resolve against non-absolute URIs
@@ -347,7 +347,7 @@ serd_uri_resolve(const SerdURI* r, const SerdURI* base, SerdURI* t)
/** Write the path of `uri` starting at index `i` */
static size_t
-write_path_tail(SerdSink sink, void* stream, const SerdURI* uri, size_t i)
+write_path_tail(SerdSink sink, void* stream, const SerdURIView* uri, size_t i)
{
size_t len = 0;
if (i < uri->path_base.len) {
@@ -368,10 +368,10 @@ write_path_tail(SerdSink sink, void* stream, const SerdURI* uri, size_t i)
/** Write the path of `uri` relative to the path of `base`. */
static size_t
-write_rel_path(SerdSink sink,
- void* stream,
- const SerdURI* uri,
- const SerdURI* base)
+write_rel_path(SerdSink sink,
+ void* stream,
+ const SerdURIView* uri,
+ const SerdURIView* base)
{
const size_t path_len = uri_path_len(uri);
const size_t base_len = uri_path_len(base);
@@ -413,7 +413,7 @@ write_rel_path(SerdSink sink,
}
static uint8_t
-serd_uri_path_starts_without_slash(const SerdURI* uri)
+serd_uri_path_starts_without_slash(const SerdURIView* uri)
{
return ((uri->path_base.len || uri->path.len) &&
((!uri->path_base.len || uri->path_base.buf[0] != '/') &&
@@ -422,11 +422,11 @@ serd_uri_path_starts_without_slash(const SerdURI* uri)
/// See http://tools.ietf.org/html/rfc3986#section-5.3
size_t
-serd_uri_serialise_relative(const SerdURI* uri,
- const SerdURI* base,
- const SerdURI* root,
- SerdSink sink,
- void* stream)
+serd_uri_serialise_relative(const SerdURIView* uri,
+ const SerdURIView* base,
+ const SerdURIView* root,
+ SerdSink sink,
+ void* stream)
{
size_t len = 0;
const bool relative =
@@ -470,7 +470,7 @@ serd_uri_serialise_relative(const SerdURI* uri,
/// See http://tools.ietf.org/html/rfc3986#section-5.3
size_t
-serd_uri_serialise(const SerdURI* uri, SerdSink sink, void* stream)
+serd_uri_serialise(const SerdURIView* uri, SerdSink sink, void* stream)
{
return serd_uri_serialise_relative(uri, NULL, NULL, sink, stream);
}