diff options
author | David Robillard <d@drobilla.net> | 2011-05-11 22:57:00 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-05-11 22:57:00 +0000 |
commit | 9f6becfdd80dfe4cf1d99d0aefa8b257eb1b0c8d (patch) | |
tree | f9436edf22df60f6327babdcae00ea861d116a8f /src/syntax.c | |
parent | a091efde0ab75c2ec2bfbb42cad083287fa891bc (diff) | |
download | sord-9f6becfdd80dfe4cf1d99d0aefa8b257eb1b0c8d.tar.gz sord-9f6becfdd80dfe4cf1d99d0aefa8b257eb1b0c8d.tar.bz2 sord-9f6becfdd80dfe4cf1d99d0aefa8b257eb1b0c8d.zip |
Preserve serd node flags for pretty serialisation.
git-svn-id: http://svn.drobilla.net/sord/trunk@107 3d64ff67-21c5-427c-a301-fe4f08042e5a
Diffstat (limited to 'src/syntax.c')
-rw-r--r-- | src/syntax.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/syntax.c b/src/syntax.c index 937de7d..1964d24 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -73,10 +73,12 @@ sord_node_from_serd_node(ReadState* state, const SerdNode* sn, return NULL; case SERD_LITERAL: datatype_node = sord_node_from_serd_node(state, datatype, NULL, NULL), - ret = sord_new_literal( + ret = sord_new_literal_counted( state->world, datatype_node, sn->buf, + sn->n_bytes - 1, + sn->flags, sord_intern_lang(state->world, (const char*)lang->buf)); sord_node_free(state->world, datatype_node); return ret; @@ -86,7 +88,8 @@ sord_node_from_serd_node(ReadState* state, const SerdNode* sn, SerdURI abs_uri; SerdNode abs_uri_node = serd_node_new_uri_from_node( sn, &base_uri, &abs_uri); - SordNode* ret = sord_new_uri(state->world, abs_uri_node.buf); + SordNode* ret = sord_new_uri_counted(state->world, abs_uri_node.buf, + abs_uri_node.n_bytes - 1); serd_node_free(&abs_uri_node); return ret; } @@ -110,7 +113,7 @@ sord_node_from_serd_node(ReadState* state, const SerdNode* sn, case SERD_BLANK_ID: case SERD_ANON_BEGIN: case SERD_ANON: - return sord_new_blank(state->world, sn->buf); + return sord_new_blank_counted(state->world, sn->buf, sn->n_bytes - 1); } return NULL; } |