aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-02-04 12:40:45 +0100
committerDavid Robillard <d@drobilla.net>2021-03-07 15:32:23 -0500
commitecbc7584a09059ab5987dca95a998c88de8b479a (patch)
treedef8e15dcdfbe60b088cce1ed68b779b66fd055b /src
parentc0410fab52f4e2e36c2779a6ec8dc9ef89a8ee58 (diff)
downloadserd-ecbc7584a09059ab5987dca95a998c88de8b479a.tar.gz
serd-ecbc7584a09059ab5987dca95a998c88de8b479a.tar.bz2
serd-ecbc7584a09059ab5987dca95a998c88de8b479a.zip
Add node accessor API
Diffstat (limited to 'src')
-rw-r--r--src/node.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/node.c b/src/node.c
index 59407243..ee910725 100644
--- a/src/node.c
+++ b/src/node.c
@@ -371,6 +371,30 @@ serd_new_blob(const void* buf, size_t size, bool wrap_lines)
return node;
}
+SerdNodeType
+serd_node_type(const SerdNode* node)
+{
+ return node->type;
+}
+
+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)
{