diff options
author | David Robillard <d@drobilla.net> | 2018-02-04 12:40:45 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-06-21 18:12:03 +0200 |
commit | 6eebfed8b6d3ca10602ae0842d4961d867c766a9 (patch) | |
tree | cb93a96ff85f1c0e985645e5fb130dbfa79a5fa4 /src | |
parent | 310779cce9bdfa7868cb09f4245b002c2abe1204 (diff) | |
download | serd-6eebfed8b6d3ca10602ae0842d4961d867c766a9.tar.gz serd-6eebfed8b6d3ca10602ae0842d4961d867c766a9.tar.bz2 serd-6eebfed8b6d3ca10602ae0842d4961d867c766a9.zip |
Add node accessor API
Diffstat (limited to 'src')
-rw-r--r-- | src/node.c | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -373,6 +373,30 @@ serd_node_new_blob(const void* buf, size_t size, bool wrap_lines) return node; } +SerdType +serd_node_get_type(const SerdNode* node) +{ + return node ? node->type : SERD_NOTHING; +} + +const char* +serd_node_get_string(const SerdNode* node) +{ + return node->buf; +} + +size_t +serd_node_get_length(const SerdNode* node) +{ + return node->n_bytes; +} + +SerdNodeFlags +serd_node_get_flags(const SerdNode* node) +{ + return node->flags; +} + void serd_node_free(SerdNode* node) { |