diff options
author | David Robillard <d@drobilla.net> | 2018-05-12 13:28:47 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-03-08 23:34:52 -0500 |
commit | 677d85c7f3df3563e990f41964f6ae7d560567a0 (patch) | |
tree | 9b5113cb7c2b2cc7ae8a07ab5a21e5a55d579559 /src/node.h | |
parent | 15485f61df8cbd922907db39fcc864abb002eea3 (diff) | |
download | serd-677d85c7f3df3563e990f41964f6ae7d560567a0.tar.gz serd-677d85c7f3df3563e990f41964f6ae7d560567a0.tar.bz2 serd-677d85c7f3df3563e990f41964f6ae7d560567a0.zip |
Add model
Diffstat (limited to 'src/node.h')
-rw-r--r-- | src/node.h | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -20,6 +20,7 @@ #include "exess/exess.h" #include "serd/serd.h" +#include <stdbool.h> #include <stddef.h> struct SerdNodeImpl { @@ -40,6 +41,20 @@ serd_node_buffer_c(const SerdNode* SERD_NONNULL node) return (const char*)(node + 1); } +static inline int +serd_node_wildcard_compare(const SerdNode* SERD_NULLABLE a, + const SerdNode* SERD_NULLABLE b) +{ + return (!a || !b) ? 0 : serd_node_compare(a, b); +} + +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 n_bytes, SerdNodeFlags flags, SerdNodeType type); |