From 0e739f34801ff6810064a8fac570f6be2b61ae70 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 13 Aug 2021 20:31:57 -0400 Subject: Simplify output stream API 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. --- tools/serd-filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/serd-filter.c') diff --git a/tools/serd-filter.c b/tools/serd-filter.c index 6cf8e0e7..a6f9b484 100644 --- a/tools/serd-filter.c +++ b/tools/serd-filter.c @@ -123,7 +123,7 @@ log_error(SerdWorld* const world, const char* const fmt, ...) static SerdStatus run(Options opts) { - SerdTool app = {NULL, NULL, NULL, NULL}; + SerdTool app = {{NULL, NULL, NULL}, NULL, NULL, NULL}; // Set up the writing environment SerdStatus st = SERD_SUCCESS; -- cgit v1.2.1