diff options
author | David Robillard <d@drobilla.net> | 2018-04-29 18:36:11 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-06-21 18:12:03 +0200 |
commit | 8dbb1edfd28c73b02b3295a4f7a01869bd2237ec (patch) | |
tree | e9a45a902aaaed8a957ca9a1b9500e497419cc0b /src | |
parent | 71898a9fe6558f0fb612b67c7b0b6d97ce75c6dd (diff) | |
download | serd-8dbb1edfd28c73b02b3295a4f7a01869bd2237ec.tar.gz serd-8dbb1edfd28c73b02b3295a4f7a01869bd2237ec.tar.bz2 serd-8dbb1edfd28c73b02b3295a4f7a01869bd2237ec.zip |
Add blank node API
Diffstat (limited to 'src')
-rw-r--r-- | src/node.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -170,6 +170,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) { |