aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-10-14 13:43:15 +0200
committerDavid Robillard <d@drobilla.net>2020-10-27 13:13:59 +0100
commit5a71277b900164392dea0bc3800db1c67b9df8e1 (patch)
treeafd5e83b0422cedfe982aa1e339968893657d3fc
parentb5287e406111e41f8efa3d1a7399cf0c1e65394f (diff)
downloadserd-5a71277b900164392dea0bc3800db1c67b9df8e1.tar.gz
serd-5a71277b900164392dea0bc3800db1c67b9df8e1.tar.bz2
serd-5a71277b900164392dea0bc3800db1c67b9df8e1.zip
fixup! WIP: Add serd_node_from_syntax() and serd_node_to_syntax()
-rw-r--r--src/node_syntax.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/node_syntax.c b/src/node_syntax.c
index 10483188..913277d5 100644
--- a/src/node_syntax.c
+++ b/src/node_syntax.c
@@ -83,15 +83,15 @@ serd_node_to_syntax(const SerdNode* node, const SerdSyntax syntax)
st = serd_writer_finish(writer);
}
- serd_buffer_sink_finish(&buffer);
+ char* const result = serd_buffer_sink_finish(&buffer);
serd_writer_free(writer);
serd_byte_sink_free(bsink);
serd_world_free(world);
if (st) {
- serd_free(buffer.buf);
+ serd_free(result);
return NULL;
}
- return (char*)buffer.buf;
+ return result;
}