aboutsummaryrefslogtreecommitdiffstats
path: root/src/node.h
diff options
context:
space:
mode:
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 29164dc2..e064e96b 100644
--- a/src/node.h
+++ b/src/node.h
@@ -20,6 +20,7 @@
#include "exess/exess.h"
#include "serd/serd.h"
+#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
@@ -49,6 +50,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);