aboutsummaryrefslogtreecommitdiffstats
path: root/src/writer.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-05-04 14:58:45 -0400
committerDavid Robillard <d@drobilla.net>2023-12-02 18:49:08 -0500
commit551faf54e35c757144204bf7a7949c0f7d0a20a3 (patch)
treee8f761fc6361c75dd443d6e91806d27025d4102a /src/writer.c
parentc3bc111f7fb2a44e068e5250f7823352e44c76dc (diff)
downloadserd-551faf54e35c757144204bf7a7949c0f7d0a20a3.tar.gz
serd-551faf54e35c757144204bf7a7949c0f7d0a20a3.tar.bz2
serd-551faf54e35c757144204bf7a7949c0f7d0a20a3.zip
Make SerdBuffer an output stream
Diffstat (limited to 'src/writer.c')
-rw-r--r--src/writer.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/writer.c b/src/writer.c
index 482721f9..c2008e2a 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -14,7 +14,6 @@
#include "world.h"
#include "serd/attributes.h"
-#include "serd/buffer.h"
#include "serd/env.h"
#include "serd/event.h"
#include "serd/node.h"
@@ -1490,29 +1489,3 @@ serd_writer_sink(SerdWriter* writer)
assert(writer);
return &writer->iface;
}
-
-size_t
-serd_buffer_sink(const void* const buf,
- const size_t size,
- const size_t nmemb,
- void* const stream)
-{
- assert(size == 1);
- (void)size;
-
- SerdBuffer* buffer = (SerdBuffer*)stream;
- char* new_buf = (char*)realloc(buffer->buf, buffer->len + nmemb);
- if (new_buf) {
- memcpy(new_buf + buffer->len, buf, nmemb);
- buffer->buf = new_buf;
- buffer->len += nmemb;
- }
- return nmemb;
-}
-
-char*
-serd_buffer_sink_finish(SerdBuffer* const stream)
-{
- serd_buffer_sink("", 1, 1, stream);
- return (char*)stream->buf;
-}