aboutsummaryrefslogtreecommitdiffstats
path: root/src/writer.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-07-08 18:46:38 +0200
committerDavid Robillard <d@drobilla.net>2018-11-25 22:12:47 +0100
commit5c6b16d108c0af6a93aba6aa629b5aa83e0116c9 (patch)
tree3e54104a7016e21bb1c07d025ed86cee667b4bc0 /src/writer.c
parentb82920ddbd6c401a033ed1ff507379fdf7fcbc03 (diff)
downloadserd-5c6b16d108c0af6a93aba6aa629b5aa83e0116c9.tar.gz
serd-5c6b16d108c0af6a93aba6aa629b5aa83e0116c9.tar.bz2
serd-5c6b16d108c0af6a93aba6aa629b5aa83e0116c9.zip
Expose SerdByteSink in public API
Diffstat (limited to 'src/writer.c')
-rw-r--r--src/writer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/writer.c b/src/writer.c
index 274e2b20..b1f68e59 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -94,7 +94,7 @@ struct SerdWriterImpl {
SerdNode* root_node;
SerdURI root_uri;
SerdStack anon_stack;
- SerdByteSink byte_sink;
+ SerdByteSink* byte_sink;
SerdErrorSink error_sink;
void* error_handle;
WriteContext context;
@@ -159,7 +159,7 @@ ctx(SerdWriter* writer, const SerdField field)
static inline size_t
sink(const void* buf, size_t len, SerdWriter* writer)
{
- return serd_byte_sink_write(buf, len, &writer->byte_sink);
+ return serd_byte_sink_write(buf, 1, len, writer->byte_sink);
}
// Write a single character, as an escape for single byte characters
@@ -853,7 +853,7 @@ serd_writer_finish(SerdWriter* writer)
if (ctx(writer, SERD_GRAPH)) {
write_sep(writer, SEP_GRAPH_END);
}
- serd_byte_sink_flush(&writer->byte_sink);
+ serd_byte_sink_flush(writer->byte_sink);
free_context(writer);
writer->indent = 0;
writer->context = WRITE_CONTEXT_NULL;
@@ -971,7 +971,7 @@ serd_writer_free(SerdWriter* writer)
serd_writer_finish(writer);
serd_stack_free(&writer->anon_stack);
free(writer->bprefix);
- serd_byte_sink_free(&writer->byte_sink);
+ serd_byte_sink_free(writer->byte_sink);
serd_node_free(writer->root_node);
free(writer);
}