aboutsummaryrefslogtreecommitdiffstats
path: root/src/node.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-05-11 16:03:03 +0000
committerDavid Robillard <d@drobilla.net>2011-05-11 16:03:03 +0000
commitefd2a2ecb17a8c633f634c2cf38fb8be48db9af5 (patch)
tree2513b24e985a02e10565563a2a9151c58f38d2c1 /src/node.c
parent1dc85d2924eacef71d0cc9144c6c33e6f84248b1 (diff)
downloadserd-efd2a2ecb17a8c633f634c2cf38fb8be48db9af5.tar.gz
serd-efd2a2ecb17a8c633f634c2cf38fb8be48db9af5.tar.bz2
serd-efd2a2ecb17a8c633f634c2cf38fb8be48db9af5.zip
Record whether strings contains quotes or newlines for smart selection of long strings vs short strings in writer output.
git-svn-id: http://svn.drobilla.net/serd/trunk@167 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src/node.c')
-rw-r--r--src/node.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/node.c b/src/node.c
index b6288ebc..edd0db86 100644
--- a/src/node.c
+++ b/src/node.c
@@ -23,9 +23,10 @@ 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 = { buf, buf_n_bytes, buf_n_chars, type };
+ uint32_t flags;
+ size_t buf_n_bytes;
+ const size_t buf_n_chars = serd_strlen(buf, &buf_n_bytes, &flags);
+ SerdNode ret = { buf, buf_n_bytes, buf_n_chars, flags, type };
return ret;
}
@@ -118,7 +119,7 @@ serd_node_new_uri(const SerdURI* uri, const SerdURI* base, SerdURI* out)
const size_t len = serd_uri_string_length(&abs_uri);
uint8_t* buf = malloc(len + 1);
- SerdNode node = { buf, len + 1, len, SERD_URI }; // FIXME: UTF-8
+ SerdNode node = { buf, len + 1, len, 0, SERD_URI }; // FIXME: UTF-8
uint8_t* ptr = buf;
const size_t actual_len = serd_uri_serialise(&abs_uri, string_sink, &ptr);