aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_terse_write.c
AgeCommit message (Collapse)AuthorFilesLines
2022-01-28Add custom allocator supportDavid Robillard1-5/+4
2022-01-28Make environments and sinks part of the worldDavid Robillard1-1/+1
Although functions/components that require minimal pre-existing state are nice, these allocate memory and could potentially share resources. So, give them a pointer to a world which can be used to configure such things. In particular, this is working towards supporting custom allocators everywhere.
2022-01-28Simplify output stream APIDavid Robillard1-4/+4
This makes the paging mechanism an internal detail once again. While it's conceptually elegant to simply have a single write interface and have the block dumper just be another implementation of that, unfortunately it is not practical. The inlining of serd_block_dumper_write() is a significant performance boost, because it avoids a non-inlinable function call of overhead per character. Compared to the SerdByteSink approach, this removes the burden and overhead of needing to dynamically allocate the structure itself.
2022-01-28Provide a full output stream implementation for SerdBufferDavid Robillard1-2/+1
Essentially replaces serd_buffer_sink_finish() with serd_buffer_close(), which makes writing to a buffer consistent with writing to a file or anything else.
2022-01-13Make Writer always write to a ByteSinkDavid Robillard1-3/+5
2022-01-13Add support for writing terse collectionsDavid Robillard1-0/+114