aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-07-10 12:56:28 -0400
committerDavid Robillard <d@drobilla.net>2022-01-13 15:33:54 -0500
commit33df293ad33cc2cd56e121770ecc2a684f181f2c (patch)
treef8cf8726664c440b621691b24e2cbdf27232db79
parent0826bb1ac3fd669e1aad4062988edc4bdee4e1d9 (diff)
downloadserd-33df293ad33cc2cd56e121770ecc2a684f181f2c.tar.gz
serd-33df293ad33cc2cd56e121770ecc2a684f181f2c.tar.bz2
serd-33df293ad33cc2cd56e121770ecc2a684f181f2c.zip
Add nullability annotations to internal node functions
-rw-r--r--src/node.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/node.h b/src/node.h
index 124b6a0d..5e5b3881 100644
--- a/src/node.h
+++ b/src/node.h
@@ -27,22 +27,23 @@ 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 length, SerdNodeFlags flags, SerdNodeType type);
void
-serd_node_set(SerdNode** dst, const SerdNode* src);
+serd_node_set(SerdNode* SERD_NULLABLE* SERD_NONNULL dst,
+ const SerdNode* SERD_NULLABLE src);
#endif // SERD_NODE_H