From e58e51850bc388ef666ebdf29d213878f5ec0629 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 12 May 2018 13:28:47 +0200 Subject: Add model --- src/node.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/node.h') diff --git a/src/node.h b/src/node.h index 3f8ec628..db5d25e2 100644 --- a/src/node.h +++ b/src/node.h @@ -19,6 +19,7 @@ #include "serd/serd.h" +#include #include struct SerdNodeImpl { @@ -39,6 +40,18 @@ serd_node_buffer_c(const SerdNode* node) return (const char*)(node + 1); } +static inline int +serd_node_wildcard_compare(const SerdNode* a, const SerdNode* b) +{ + return (!a || !b) ? 0 : serd_node_compare(a, b); +} + +static inline bool +serd_node_pattern_match(const SerdNode* a, const SerdNode* b) +{ + return !a || !b || serd_node_equals(a, b); +} + SerdNode* serd_node_malloc(size_t n_bytes, SerdNodeFlags flags, SerdNodeType type); -- cgit v1.2.1