aboutsummaryrefslogtreecommitdiffstats
path: root/src/node.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-02-20 16:47:55 -0500
committerDavid Robillard <d@drobilla.net>2021-03-07 15:32:24 -0500
commit941b14a0ab8f7c80f94e04762e65a48f9ed02f6e (patch)
treea7e89d7d2bb0150728c5eec3d4d9e6730f9af016 /src/node.h
parentd243368f8e2f79a125a5858223f71fb40fe84525 (diff)
downloadserd-941b14a0ab8f7c80f94e04762e65a48f9ed02f6e.tar.gz
serd-941b14a0ab8f7c80f94e04762e65a48f9ed02f6e.tar.bz2
serd-941b14a0ab8f7c80f94e04762e65a48f9ed02f6e.zip
Simplify URI API and implementation
Diffstat (limited to 'src/node.h')
-rw-r--r--src/node.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/node.h b/src/node.h
index 1c37c68d..5c6f790e 100644
--- a/src/node.h
+++ b/src/node.h
@@ -27,22 +27,27 @@ struct SerdNodeImpl {
SerdNodeType type; /**< Node type */
};
-static inline char*
-serd_node_buffer(SerdNode* node)
+static inline char* SERD_NONNULL
+serd_node_buffer(SerdNode* SERD_NONNULL node)
{
return (char*)(node + 1);
}
-static inline const char*
-serd_node_buffer_c(const SerdNode* node)
+static inline const char* SERD_NONNULL
+serd_node_buffer_c(const SerdNode* SERD_NONNULL node)
{
return (const char*)(node + 1);
}
-SerdNode*
+SerdNode* SERD_ALLOCATED
serd_node_malloc(size_t n_bytes, SerdNodeFlags flags, SerdNodeType type);
void
-serd_node_set(SerdNode** dst, const SerdNode* src);
+serd_node_set(SerdNode* SERD_NONNULL* SERD_NONNULL dst,
+ const SerdNode* SERD_NONNULL src);
+
+/// Create a new URI from a string, resolved against a base URI
+SerdNode* SERD_ALLOCATED
+serd_new_resolved_uri(SerdStringView string, SerdURIView base_uri);
#endif // SERD_NODE_H