diff options
Diffstat (limited to 'src/node.c')
-rw-r--r-- | src/node.c | 32 |
1 files changed, 17 insertions, 15 deletions
@@ -87,7 +87,7 @@ serd_node_equals(const SerdNode* a, const SerdNode* b) } static size_t -serd_uri_string_length(const SerdURI* uri) +serd_uri_string_length(const SerdURIView* uri) { size_t len = uri->path_base.len; @@ -115,9 +115,9 @@ string_sink(const void* buf, size_t len, void* stream) } SerdNode -serd_node_new_uri_from_node(const SerdNode* uri_node, - const SerdURI* base, - SerdURI* out) +serd_node_new_uri_from_node(const SerdNode* uri_node, + const SerdURIView* base, + SerdURIView* out) { return (uri_node->type == SERD_URI && uri_node->buf) ? serd_node_new_uri_from_string(uri_node->buf, base, out) @@ -125,16 +125,16 @@ serd_node_new_uri_from_node(const SerdNode* uri_node, } SerdNode -serd_node_new_uri_from_string(const char* str, - const SerdURI* base, - SerdURI* out) +serd_node_new_uri_from_string(const char* str, + const SerdURIView* base, + SerdURIView* out) { if (!str || str[0] == '\0') { // Empty URI => Base URI, or nothing if no base is given return base ? serd_node_new_uri(base, NULL, out) : SERD_NODE_NULL; } - SerdURI uri; + SerdURIView uri; serd_uri_parse(str, &uri); return serd_node_new_uri(&uri, base, out); // Resolve/Serialise } @@ -176,7 +176,7 @@ is_uri_path_char(const char c) } SerdNode -serd_node_new_file_uri(const char* path, const char* hostname, SerdURI* out) +serd_node_new_file_uri(const char* path, const char* hostname, SerdURIView* out) { const size_t path_len = strlen(path); const size_t hostname_len = hostname ? strlen(hostname) : 0; @@ -224,9 +224,11 @@ serd_node_new_file_uri(const char* path, const char* hostname, SerdURI* out) } SerdNode -serd_node_new_uri(const SerdURI* uri, const SerdURI* base, SerdURI* out) +serd_node_new_uri(const SerdURIView* uri, + const SerdURIView* base, + SerdURIView* out) { - SerdURI abs_uri = *uri; + SerdURIView abs_uri = *uri; if (base) { serd_uri_resolve(uri, base, &abs_uri); } @@ -248,10 +250,10 @@ serd_node_new_uri(const SerdURI* uri, const SerdURI* base, SerdURI* out) } SerdNode -serd_node_new_relative_uri(const SerdURI* uri, - const SerdURI* base, - const SerdURI* root, - SerdURI* out) +serd_node_new_relative_uri(const SerdURIView* uri, + const SerdURIView* base, + const SerdURIView* root, + SerdURIView* out) { const size_t uri_len = serd_uri_string_length(uri); const size_t base_len = serd_uri_string_length(base); |