From 551faf54e35c757144204bf7a7949c0f7d0a20a3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 4 May 2023 14:58:45 -0400 Subject: Make SerdBuffer an output stream --- test/test_reader_writer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/test_reader_writer.c') diff --git a/test/test_reader_writer.c b/test/test_reader_writer.c index 3cf7cf5d..acd43ad1 100644 --- a/test/test_reader_writer.c +++ b/test/test_reader_writer.c @@ -210,7 +210,7 @@ test_writer(const char* const path) // Test buffer sink SerdBuffer buffer = {NULL, 0}; writer = - serd_writer_new(world, SERD_TURTLE, 0, env, serd_buffer_sink, &buffer); + serd_writer_new(world, SERD_TURTLE, 0, env, serd_buffer_write, &buffer); SerdNode* const base = serd_new_uri(serd_string("http://example.org/base")); @@ -218,8 +218,9 @@ test_writer(const char* const path) serd_node_free(base); serd_writer_free(writer); - char* out = serd_buffer_sink_finish(&buffer); + serd_buffer_close(&buffer); + char* const out = (char*)buffer.buf; assert(!strcmp(out, "@base .\n")); serd_free(out); -- cgit v1.2.1