From eb19473f1a5dd412f945a4526cb7834113defa44 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sun, 15 Jan 2023 17:10:04 -0800 Subject: til_stream: add a second void* to til_stream_pipe_t It seems likely that pipe owners will need not only a way to differentiate themselves via the owner pointer, but also somewhere to register a pipe-specific reference. There probably needs to be a result pointer added for storing the owner_foo when the owner taps, so the owner can make use of it. --- src/til_stream.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/til_stream.h') diff --git a/src/til_stream.h b/src/til_stream.h index 560cc05..6424537 100644 --- a/src/til_stream.h +++ b/src/til_stream.h @@ -29,12 +29,12 @@ til_stream_t * til_stream_new(void); til_stream_t * til_stream_free(til_stream_t *stream); /* bare interface for non-module-context owned taps */ -int til_stream_tap(til_stream_t *stream, const void *tap_owner, const char *parent_path, uint32_t parent_hash, const til_tap_t *tap); +int til_stream_tap(til_stream_t *stream, const void *owner, const void *owner_foo, const char *parent_path, uint32_t parent_hash, const til_tap_t *tap); /* convenience helper for use within modules */ -static inline int til_stream_tap_context(til_stream_t *stream, const til_module_context_t *module_context, const til_tap_t *tap) +static inline int til_stream_tap_context(til_stream_t *stream, const til_module_context_t *module_context, const void *owner_foo, const til_tap_t *tap) { - return til_stream_tap(stream, module_context, module_context->path, module_context->path_hash, tap); + return til_stream_tap(stream, module_context, owner_foo, module_context->path, module_context->path_hash, tap); } void til_stream_untap_owner(til_stream_t *stream, const void *owner); -- cgit v1.2.1