From eb804125430e3445e85c423b28e1c41346772ed0 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 10 Sep 2021 13:20:47 -0400 Subject: Make environments and sinks part of the world 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. --- src/sink.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/sink.c') diff --git a/src/sink.c b/src/sink.c index bd6f1193..3e22f11c 100644 --- a/src/sink.c +++ b/src/sink.c @@ -24,10 +24,13 @@ #include SerdSink* -serd_sink_new(void* const handle, - SerdEventFunc event_func, - SerdFreeFunc free_handle) +serd_sink_new(const SerdWorld* const world, + void* const handle, + SerdEventFunc event_func, + SerdFreeFunc free_handle) { + (void)world; + SerdSink* sink = (SerdSink*)calloc(1, sizeof(SerdSink)); sink->handle = handle; -- cgit v1.2.1