diff options
author | David Robillard <d@drobilla.net> | 2018-05-12 13:28:47 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-10-27 13:13:58 +0100 |
commit | 2be5c4870ebc6dc3f0562dcf53eda3c946981a1c (patch) | |
tree | abc513fd38b6ca183c9fa02ec5148a89b4aa6f31 /src/node.h | |
parent | 0e8a72aae08b64beb11d97f020c14126178d7545 (diff) | |
download | serd-2be5c4870ebc6dc3f0562dcf53eda3c946981a1c.tar.gz serd-2be5c4870ebc6dc3f0562dcf53eda3c946981a1c.tar.bz2 serd-2be5c4870ebc6dc3f0562dcf53eda3c946981a1c.zip |
Add model
Diffstat (limited to 'src/node.h')
-rw-r--r-- | src/node.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -19,6 +19,7 @@ #include "serd/serd.h" +#include <stdbool.h> #include <stddef.h> 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); |