aboutsummaryrefslogtreecommitdiffstats
path: root/src/writer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/writer.c')
-rw-r--r--src/writer.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/writer.c b/src/writer.c
index 751df38f..241e6fbf 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -1256,21 +1256,21 @@ serd_file_sink(const void* buf, size_t len, void* stream)
}
size_t
-serd_chunk_sink(const void* buf, size_t len, void* stream)
+serd_buffer_sink(const void* const buf, const size_t len, void* const stream)
{
- SerdChunk* chunk = (SerdChunk*)stream;
- char* new_buf = (char*)realloc((char*)chunk->buf, chunk->len + len);
+ SerdBuffer* buffer = (SerdBuffer*)stream;
+ char* new_buf = (char*)realloc((char*)buffer->buf, buffer->len + len);
if (new_buf) {
- memcpy(new_buf + chunk->len, buf, len);
- chunk->buf = new_buf;
- chunk->len += len;
+ memcpy(new_buf + buffer->len, buf, len);
+ buffer->buf = new_buf;
+ buffer->len += len;
}
return len;
}
char*
-serd_chunk_sink_finish(SerdChunk* stream)
+serd_buffer_sink_finish(SerdBuffer* const stream)
{
- serd_chunk_sink("", 1, stream);
+ serd_buffer_sink("", 1, stream);
return (char*)stream->buf;
}