diff options
author | David Robillard <d@drobilla.net> | 2021-02-20 13:17:03 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-12-02 16:27:02 -0500 |
commit | 53c28210b9e81ba33fddce89b2d61fb7c99445dc (patch) | |
tree | 524885916085088ee8d2744cbe3ff4ed217f149f /src/uri_utils.h | |
parent | 19b9f627ba195cab7c7ebea9daca9ead6e4f5d9a (diff) | |
download | serd-53c28210b9e81ba33fddce89b2d61fb7c99445dc.tar.gz serd-53c28210b9e81ba33fddce89b2d61fb7c99445dc.tar.bz2 serd-53c28210b9e81ba33fddce89b2d61fb7c99445dc.zip |
Rename SerdURI to SerdURIView
Diffstat (limited to 'src/uri_utils.h')
-rw-r--r-- | src/uri_utils.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/uri_utils.h b/src/uri_utils.h index 9146ee79..b275cf5f 100644 --- a/src/uri_utils.h +++ b/src/uri_utils.h @@ -23,13 +23,13 @@ slice_equals(const SerdStringView* a, const SerdStringView* b) } static inline size_t -uri_path_len(const SerdURI* uri) +uri_path_len(const SerdURIView* uri) { return uri->path_base.len + uri->path.len; } static inline char -uri_path_at(const SerdURI* uri, size_t i) +uri_path_at(const SerdURIView* uri, size_t i) { if (i < uri->path_base.len) { return uri->path_base.buf[i]; @@ -47,7 +47,7 @@ uri_path_at(const SerdURI* uri, size_t i) otherwise it may merely share some leading path components). */ static inline SERD_PURE_FUNC SlashIndexes -uri_rooted_index(const SerdURI* uri, const SerdURI* root) +uri_rooted_index(const SerdURIView* uri, const SerdURIView* root) { SlashIndexes indexes = {SIZE_MAX, SIZE_MAX}; @@ -85,14 +85,14 @@ uri_rooted_index(const SerdURI* uri, const SerdURI* root) /** Return true iff `uri` shares path components with `root` */ static inline SERD_PURE_FUNC bool -uri_is_related(const SerdURI* uri, const SerdURI* root) +uri_is_related(const SerdURIView* uri, const SerdURIView* root) { return uri_rooted_index(uri, root).shared != SIZE_MAX; } /** Return true iff `uri` is within the base of `root` */ static inline SERD_PURE_FUNC bool -uri_is_under(const SerdURI* uri, const SerdURI* root) +uri_is_under(const SerdURIView* uri, const SerdURIView* root) { const SlashIndexes indexes = uri_rooted_index(uri, root); return indexes.shared && indexes.shared != SIZE_MAX && |