From bafa091fada7b3fdc663567abc0a7455bc3a77c9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 10 Nov 2020 15:44:37 +0100 Subject: Add const, pure, and malloc function attributes --- src/uri_utils.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/uri_utils.h') diff --git a/src/uri_utils.h b/src/uri_utils.h index 4dbcdba5..896d9d8b 100644 --- a/src/uri_utils.h +++ b/src/uri_utils.h @@ -48,7 +48,7 @@ uri_path_at(const SerdURI* uri, size_t i) Return the index of the first differing character after the last root slash, or zero if `uri` is not under `root`. */ -static inline size_t +static inline SERD_PURE_FUNC size_t uri_rooted_index(const SerdURI* uri, const SerdURI* root) { if (!root || !root->scheme.len || @@ -78,14 +78,14 @@ uri_rooted_index(const SerdURI* uri, const SerdURI* root) } /** Return true iff `uri` shares path components with `root` */ -static inline bool +static inline SERD_PURE_FUNC bool uri_is_related(const SerdURI* uri, const SerdURI* root) { return uri_rooted_index(uri, root) > 0; } /** Return true iff `uri` is within the base of `root` */ -static inline bool +static inline SERD_PURE_FUNC bool uri_is_under(const SerdURI* uri, const SerdURI* root) { const size_t index = uri_rooted_index(uri, root); -- cgit v1.2.1