From 0f9816d67bc67a396607291f845ca2a33c2285a7 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 19 Dec 2022 17:55:02 -0500 Subject: Use ZixAllocator directly --- tools/serd-filter.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tools/serd-filter.c') diff --git a/tools/serd-filter.c b/tools/serd-filter.c index 464a727e..5c7211b3 100644 --- a/tools/serd-filter.c +++ b/tools/serd-filter.c @@ -9,7 +9,6 @@ #include "serd/filter.h" #include "serd/input_stream.h" #include "serd/log.h" -#include "serd/memory.h" #include "serd/node.h" #include "serd/nodes.h" #include "serd/reader.h" @@ -19,6 +18,7 @@ #include "serd/syntax.h" #include "serd/world.h" #include "serd/writer.h" +#include "zix/allocator.h" #include "zix/string_view.h" #include @@ -49,8 +49,8 @@ typedef struct { // Context for the pattern event callback typedef struct { - SerdAllocator* allocator; - FilterPattern pattern; + ZixAllocator* allocator; + FilterPattern pattern; } PatternEventContext; // Handler for events read from a pattern @@ -58,7 +58,7 @@ static SerdStatus on_pattern_event(void* const handle, const SerdEvent* const event) { PatternEventContext* const ctx = (PatternEventContext*)handle; - SerdAllocator* const allocator = ctx->allocator; + ZixAllocator* const allocator = ctx->allocator; if (event->type == SERD_STATEMENT) { FilterPattern* const pat = &ctx->pattern; @@ -83,9 +83,9 @@ parse_pattern(SerdWorld* const world, SerdInputStream* const in, const bool inclusive) { - SerdAllocator* const allocator = serd_world_allocator(world); - SerdEnv* const env = serd_env_new(allocator, zix_empty_string()); - PatternEventContext ctx = {allocator, {NULL, NULL, NULL, NULL}}; + ZixAllocator* const allocator = serd_world_allocator(world); + SerdEnv* const env = serd_env_new(allocator, zix_empty_string()); + PatternEventContext ctx = {allocator, {NULL, NULL, NULL, NULL}}; SerdSink* in_sink = serd_sink_new(allocator, &ctx, on_pattern_event, NULL); SerdReader* reader = -- cgit v1.2.1