aboutsummaryrefslogtreecommitdiffstats
path: root/src/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/node.c')
-rw-r--r--src/node.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/node.c b/src/node.c
index 65390848..5264458a 100644
--- a/src/node.c
+++ b/src/node.c
@@ -160,6 +160,20 @@ serd_node_new_literal(const char* str,
}
SerdNode*
+serd_node_new_blank(const char* str)
+{
+ if (!str) {
+ return NULL;
+ }
+
+ const size_t n_bytes = strlen(str);
+ SerdNode* node = serd_node_malloc(n_bytes, 0, SERD_BLANK);
+ memcpy(serd_node_buffer(node), str, n_bytes);
+ node->n_bytes = n_bytes;
+ return node;
+}
+
+SerdNode*
serd_node_copy(const SerdNode* node)
{
if (!node) {