aboutsummaryrefslogtreecommitdiffstats
path: root/src/node.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-06-03 19:24:59 +0200
committerDavid Robillard <d@drobilla.net>2023-12-02 18:49:07 -0500
commit40534e6c42daabb6cc8ec2d49785bec088d1d3a8 (patch)
tree593e37de3e9bce98e291ec098a7081e6e26240b0 /src/node.h
parent38f85ad8c53c618033e3d0b7cb1fe782c38cf0a3 (diff)
downloadserd-40534e6c42daabb6cc8ec2d49785bec088d1d3a8.tar.gz
serd-40534e6c42daabb6cc8ec2d49785bec088d1d3a8.tar.bz2
serd-40534e6c42daabb6cc8ec2d49785bec088d1d3a8.zip
Add SerdStatement
Diffstat (limited to 'src/node.h')
-rw-r--r--src/node.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/node.h b/src/node.h
index fc03bf72..ee903d3c 100644
--- a/src/node.h
+++ b/src/node.h
@@ -10,6 +10,7 @@
#include "serd/string_view.h"
#include "serd/uri.h"
+#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
@@ -39,6 +40,13 @@ serd_node_string_i(const SerdNode* const SERD_NONNULL node)
return (const char*)(node + 1);
}
+static inline bool
+serd_node_pattern_match(const SerdNode* SERD_NULLABLE a,
+ const SerdNode* SERD_NULLABLE b)
+{
+ return !a || !b || serd_node_equals(a, b);
+}
+
SerdNode* SERD_ALLOCATED
serd_node_malloc(size_t length, SerdNodeFlags flags, SerdNodeType type);