aboutsummaryrefslogtreecommitdiffstats
path: root/src/reader.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-04-23 21:27:47 +0000
committerDavid Robillard <d@drobilla.net>2011-04-23 21:27:47 +0000
commitc8bca421254840c7eb249e138d06f6ae0b008290 (patch)
tree8336af934b9db34bde70372c13ee792630ceaf3b /src/reader.c
parent82fdce9e8aa514710b349d3862148c7309d0ba36 (diff)
downloadserd-c8bca421254840c7eb249e138d06f6ae0b008290.tar.gz
serd-c8bca421254840c7eb249e138d06f6ae0b008290.tar.bz2
serd-c8bca421254840c7eb249e138d06f6ae0b008290.zip
Improve node struct alignment
git-svn-id: http://svn.drobilla.net/serd/trunk@147 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src/reader.c')
-rw-r--r--src/reader.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/reader.c b/src/reader.c
index 615f4d46..10b812e9 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -288,7 +288,7 @@ public_node_from_ref(SerdReader reader, SerdType type, Ref ref)
return SERD_NODE_NULL;
}
const SerdString* str = deref(reader, ref);
- const SerdNode public = { type, str->n_bytes, str->n_chars, str->buf };
+ const SerdNode public = { str->buf, str->n_bytes, str->n_chars, type };
return public;
}
@@ -1484,10 +1484,10 @@ serd_read_state_expand(SerdReadState state,
SerdChunk prefix;
SerdChunk suffix;
serd_env_expand(state->env, node, &prefix, &suffix);
- SerdNode ret = { SERD_URI,
+ SerdNode ret = { NULL,
prefix.len + suffix.len + 1,
prefix.len + suffix.len, // FIXME: UTF-8
- NULL };
+ SERD_URI };
ret.buf = malloc(ret.n_bytes);
snprintf((char*)ret.buf, ret.n_bytes, "%s%s", prefix.buf, suffix.buf);
return ret;