From 82f8f804773b10c42b17a30872a59ed76b062794 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 13 Jan 2021 14:31:00 +0100 Subject: Add SerdBuffer type for mutable buffers This avoids const violations from abusing SerdChunk as a mutable buffer for string sinks. --- test/test_writer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/test_writer.c') diff --git a/test/test_writer.c b/test/test_writer.c index 7033db76..aa1b05e7 100644 --- a/test/test_writer.c +++ b/test/test_writer.c @@ -14,9 +14,9 @@ static void test_write_long_literal(void) { SerdEnv* env = serd_env_new(NULL); - SerdChunk chunk = {NULL, 0}; + SerdBuffer buffer = {NULL, 0}; SerdWriter* writer = serd_writer_new( - SERD_TURTLE, (SerdStyle)0, env, NULL, serd_chunk_sink, &chunk); + SERD_TURTLE, (SerdStyle)0, env, NULL, serd_buffer_sink, &buffer); assert(writer); @@ -29,7 +29,7 @@ test_write_long_literal(void) serd_writer_free(writer); serd_env_free(env); - char* out = serd_chunk_sink_finish(&chunk); + char* out = serd_buffer_sink_finish(&buffer); static const char* const expected = "\n" -- cgit v1.2.1