diff options
author | David Robillard <d@drobilla.net> | 2023-05-04 14:58:45 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-12-02 18:49:08 -0500 |
commit | 551faf54e35c757144204bf7a7949c0f7d0a20a3 (patch) | |
tree | e8f761fc6361c75dd443d6e91806d27025d4102a /test/test_reader_writer.c | |
parent | c3bc111f7fb2a44e068e5250f7823352e44c76dc (diff) | |
download | serd-551faf54e35c757144204bf7a7949c0f7d0a20a3.tar.gz serd-551faf54e35c757144204bf7a7949c0f7d0a20a3.tar.bz2 serd-551faf54e35c757144204bf7a7949c0f7d0a20a3.zip |
Make SerdBuffer an output stream
Diffstat (limited to 'test/test_reader_writer.c')
-rw-r--r-- | test/test_reader_writer.c | 5 |
1 files changed, 3 insertions, 2 deletions
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 <http://example.org/base> .\n")); serd_free(out); |