aboutsummaryrefslogtreecommitdiffstats
path: root/src/uri_utils.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-11-10 15:44:37 +0100
committerDavid Robillard <d@drobilla.net>2020-11-10 18:29:45 +0100
commitbafa091fada7b3fdc663567abc0a7455bc3a77c9 (patch)
tree68c73bbdec5d0fa83cc2913c7a13f48e84a3bdff /src/uri_utils.h
parentf820212f2ac92400cf277686e4f79e740b95688c (diff)
downloadserd-bafa091fada7b3fdc663567abc0a7455bc3a77c9.tar.gz
serd-bafa091fada7b3fdc663567abc0a7455bc3a77c9.tar.bz2
serd-bafa091fada7b3fdc663567abc0a7455bc3a77c9.zip
Add const, pure, and malloc function attributes
Diffstat (limited to 'src/uri_utils.h')
-rw-r--r--src/uri_utils.h6
1 files changed, 3 insertions, 3 deletions
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);