aboutsummaryrefslogtreecommitdiffstats
path: root/src/node.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-02-04 12:40:45 +0100
committerDavid Robillard <d@drobilla.net>2023-12-02 16:27:02 -0500
commitb0d4ae792c88cc55f9cc9a579530a1a13a158fda (patch)
tree06f1929415ae2d24d95fe6b1ccdc668e4b19f5a3 /src/node.c
parent4401b2bbcda598599469722d7288bc36e389e356 (diff)
downloadserd-b0d4ae792c88cc55f9cc9a579530a1a13a158fda.tar.gz
serd-b0d4ae792c88cc55f9cc9a579530a1a13a158fda.tar.bz2
serd-b0d4ae792c88cc55f9cc9a579530a1a13a158fda.zip
Add node accessor API
Diffstat (limited to 'src/node.c')
-rw-r--r--src/node.c24
1 files changed, 24 insertions, 0 deletions
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)
{