diff options
author | David Robillard <d@drobilla.net> | 2016-03-15 23:21:34 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-10-27 13:13:58 +0100 |
commit | c63451092692c251cab874475d3540408ed5d8c2 (patch) | |
tree | 02a91a059723946c5db5f11977a79d1f1aed1a85 /tests | |
parent | 203ca287b9fe7dc00f02ac5e354260cfedfeac93 (diff) | |
download | serd-c63451092692c251cab874475d3540408ed5d8c2.tar.gz serd-c63451092692c251cab874475d3540408ed5d8c2.tar.bz2 serd-c63451092692c251cab874475d3540408ed5d8c2.zip |
Add SerdBuffer type for mutable buffers
This avoids const violations from abusing SerdChunk as a mutable buffer
for string sinks.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/serd_test.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/serd_test.c b/tests/serd_test.c index efb38161..816a25cc 100644 --- a/tests/serd_test.c +++ b/tests/serd_test.c @@ -561,16 +561,16 @@ test_writer(const char* const path) serd_writer_free(writer); - // Test chunk sink - SerdChunk chunk = { NULL, 0 }; + // Test buffer sink + SerdBuffer buffer = { NULL, 0 }; writer = serd_writer_new( - SERD_TURTLE, (SerdStyle)0, env, NULL, serd_chunk_sink, &chunk); + SERD_TURTLE, (SerdStyle)0, env, NULL, serd_buffer_sink, &buffer); o = serd_node_from_string(SERD_URI, USTR("http://example.org/base")); assert(!serd_writer_set_base_uri(writer, &o)); serd_writer_free(writer); - uint8_t* out = serd_chunk_sink_finish(&chunk); + uint8_t* out = serd_buffer_sink_finish(&buffer); assert(!strcmp((const char*)out, "@base <http://example.org/base> .\n")); serd_free(out); |