aboutsummaryrefslogtreecommitdiffstats
path: root/src/sink.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-09-10 13:20:47 -0400
committerDavid Robillard <d@drobilla.net>2022-01-28 21:57:07 -0500
commiteb804125430e3445e85c423b28e1c41346772ed0 (patch)
tree532f6995ace537170fbbfde2d0d8226d1a48279b /src/sink.c
parentcbf01be4126cbc0f6d80364a7e0b6ad777a7d8ae (diff)
downloadserd-eb804125430e3445e85c423b28e1c41346772ed0.tar.gz
serd-eb804125430e3445e85c423b28e1c41346772ed0.tar.bz2
serd-eb804125430e3445e85c423b28e1c41346772ed0.zip
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.
Diffstat (limited to 'src/sink.c')
-rw-r--r--src/sink.c9
1 files changed, 6 insertions, 3 deletions
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 <stdlib.h>
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;