diff options
author | David Robillard <d@drobilla.net> | 2018-02-04 12:40:45 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-10-27 13:13:58 +0100 |
commit | 562191c700143fc867092d828e850c81137a73e4 (patch) | |
tree | aa42036b01f9dbd45ba72e2b435d2cf10b1239b6 /src | |
parent | ca7b73aea47367e946c473dd235061e48effdb5f (diff) | |
download | serd-562191c700143fc867092d828e850c81137a73e4.tar.gz serd-562191c700143fc867092d828e850c81137a73e4.tar.bz2 serd-562191c700143fc867092d828e850c81137a73e4.zip |
Add node accessor API
Diffstat (limited to 'src')
-rw-r--r-- | src/node.c | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -350,6 +350,30 @@ serd_node_new_blob(const void* buf, size_t size, bool wrap_lines) return node; } +SerdType +serd_node_type(const SerdNode* node) +{ + return node ? node->type : SERD_NOTHING; +} + +const char* +serd_node_string(const SerdNode* node) +{ + return node->buf; +} + +size_t +serd_node_length(const SerdNode* node) +{ + return node->n_bytes; +} + +SerdNodeFlags +serd_node_flags(const SerdNode* node) +{ + return node->flags; +} + void serd_node_free(SerdNode* node) { |