From b0d4ae792c88cc55f9cc9a579530a1a13a158fda Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 4 Feb 2018 12:40:45 +0100 Subject: Add node accessor API --- src/node.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/node.c') diff --git a/src/node.c b/src/node.c index db814233..63e4b486 100644 --- a/src/node.c +++ b/src/node.c @@ -379,6 +379,30 @@ serd_new_blob(const void* const buf, const size_t size, const bool wrap_lines) return node; } +SerdNodeType +serd_node_type(const SerdNode* const node) +{ + return node->type; +} + +const char* +serd_node_string(const SerdNode* const node) +{ + return node->buf; +} + +size_t +serd_node_length(const SerdNode* const node) +{ + return node->n_bytes; +} + +SerdNodeFlags +serd_node_flags(const SerdNode* const node) +{ + return node->flags; +} + void serd_node_free(SerdNode* const node) { -- cgit v1.2.1