diff options
Diffstat (limited to 'serd')
-rw-r--r-- | serd/serd.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/serd/serd.h b/serd/serd.h index e471988c..72e64c20 100644 --- a/serd/serd.h +++ b/serd/serd.h @@ -1014,6 +1014,9 @@ serd_env_write_prefixes(const SerdEnv* env, const SerdSink* sink); @{ */ +/// Function to free an opaque handle +typedef void (*SerdFreeFunc)(void* ptr); + /** Create a new sink @@ -1021,10 +1024,11 @@ serd_env_write_prefixes(const SerdEnv* env, const SerdSink* sink); serd_sink_set_*_func functions to set handlers for various events. @param handle Opaque handle that will be passed to sink functions. + @param free_handle Free function to call on handle in serd_sink_free(). */ SERD_API SerdSink* -serd_sink_new(void* handle); +serd_sink_new(void* handle, SerdFreeFunc free_handle); /// Free `sink` SERD_API |