aboutsummaryrefslogtreecommitdiffstats
path: root/src/sink.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-09-10 15:06:42 -0400
committerDavid Robillard <d@drobilla.net>2023-12-02 18:49:08 -0500
commit248a874d7425749d29cf900a1c3783c624ea8d8c (patch)
treeaed59f5a484a815cd254506866e98a947858904d /src/sink.h
parent0bd10132c6707353dba80bd89cf0102ee7ca4e34 (diff)
downloadserd-248a874d7425749d29cf900a1c3783c624ea8d8c.tar.gz
serd-248a874d7425749d29cf900a1c3783c624ea8d8c.tar.bz2
serd-248a874d7425749d29cf900a1c3783c624ea8d8c.zip
Add support for custom allocators
This makes it explicit in the API where memory is allocated, and allows the user to provide a custom allocator to avoid the use of the default system allocator for whatever reason.
Diffstat (limited to 'src/sink.h')
-rw-r--r--src/sink.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/sink.h b/src/sink.h
index 097e0d6d..baed246e 100644
--- a/src/sink.h
+++ b/src/sink.h
@@ -5,15 +5,17 @@
#define SERD_SRC_SINK_H
#include "serd/event.h"
+#include "serd/memory.h"
#include "serd/sink.h"
/**
An interface that receives a stream of RDF data.
*/
struct SerdSinkImpl {
- void* handle;
- SerdFreeFunc free_handle;
- SerdEventFunc on_event;
+ SerdAllocator* allocator;
+ void* handle;
+ SerdFreeFunc free_handle;
+ SerdEventFunc on_event;
};
#endif // SERD_SRC_SINK_H