diff options
author | David Robillard <d@drobilla.net> | 2011-02-03 03:08:43 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-02-03 03:08:43 +0000 |
commit | 051f8e0bfdd0083f152197e1da6db70af0bb9793 (patch) | |
tree | dfbd934681fd714696a29f0d2ac9f2be9886f03f /src/node.c | |
parent | 787af7fe07b00057b7d886e9fd508b259914997d (diff) | |
download | serd-051f8e0bfdd0083f152197e1da6db70af0bb9793.tar.gz serd-051f8e0bfdd0083f152197e1da6db70af0bb9793.tar.bz2 serd-051f8e0bfdd0083f152197e1da6db70af0bb9793.zip |
Add serd_node_from_string.
git-svn-id: http://svn.drobilla.net/serd/trunk@90 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src/node.c')
-rw-r--r-- | src/node.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -24,6 +24,16 @@ SERD_API SerdNode +serd_node_from_string(SerdType type, const uint8_t* buf) +{ + size_t buf_n_bytes; + const size_t buf_n_chars = serd_strlen(buf, &buf_n_bytes); + SerdNode ret = { type, buf_n_bytes, buf_n_chars, buf }; + return ret; +} + +SERD_API +SerdNode serd_node_copy(const SerdNode* node) { SerdNode copy = *node; |