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.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/til_stream.c') diff --git a/src/til_stream.c b/src/til_stream.c index a47f953..5f26c72 100644 --- a/src/til_stream.c +++ b/src/til_stream.c @@ -73,6 +73,7 @@ typedef struct til_stream_pipe_t til_stream_pipe_t; struct til_stream_pipe_t { til_stream_pipe_t *next; const void *owner; + const void *owner_foo; char *parent_path; const til_tap_t *driving_tap; uint32_t hash; @@ -127,7 +128,7 @@ til_stream_t * til_stream_free(til_stream_t *stream) * * If stream is NULL it's treated as if the key doesn't exist without a pipe creation. */ -int til_stream_tap(til_stream_t *stream, const void *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) { uint32_t hash, bucket; til_stream_pipe_t *pipe; @@ -173,6 +174,7 @@ int til_stream_tap(til_stream_t *stream, const void *owner, const char *parent_p } pipe->owner = owner; + pipe->owner_foo = owner_foo; pipe->driving_tap = tap; pipe->parent_path = strdup(parent_path); -- cgit v1.2.1