diff options
author | David Robillard <d@drobilla.net> | 2020-10-14 13:43:15 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-10-27 13:13:59 +0100 |
commit | 5a71277b900164392dea0bc3800db1c67b9df8e1 (patch) | |
tree | afd5e83b0422cedfe982aa1e339968893657d3fc | |
parent | b5287e406111e41f8efa3d1a7399cf0c1e65394f (diff) | |
download | serd-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.c | 6 |
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; } |