aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-03-28 12:12:13 -0400
committerDavid Robillard <d@drobilla.net>2023-04-05 09:45:15 -0400
commitab68ee17007626e5662c4f8c7388cb0540f3067c (patch)
tree5a451386ce64926d3f55ae4a9ec07e259ea75f14
parent10ceef8e1f6d0126eeb9ef82b74bb8bf2f4e9c7b (diff)
downloadserd-ab68ee17007626e5662c4f8c7388cb0540f3067c.tar.gz
serd-ab68ee17007626e5662c4f8c7388cb0540f3067c.tar.bz2
serd-ab68ee17007626e5662c4f8c7388cb0540f3067c.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 efe3ade3..a4d5dcd5 100644
--- a/src/node.h
+++ b/src/node.h
@@ -14,22 +14,23 @@ struct SerdNodeImpl {
SerdType 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, SerdType 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_SRC_NODE_H