From fb1efe264854e2539d62da1d9dc019ffa8a899da Mon Sep 17 00:00:00 2001 From: Alessandro Iezzi Date: Wed, 17 May 2023 16:51:48 +0200 Subject: Divide in two functions the clist_add In some cases, I need to retrieve the original pointer in list_item. So, the clist_add() just adds the pointer to the list, and, clist_add_s() adds a copy of that pointer to the list. --- src/utils.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/utils.h') diff --git a/src/utils.h b/src/utils.h index 6c5db92..b92ca1c 100644 --- a/src/utils.h +++ b/src/utils.h @@ -20,7 +20,8 @@ typedef struct iterator_t { } iterator_t; list_t clist_create (void); -void clist_add (list_t *, void *, size_t); +void clist_add (list_t *, void *); +void clist_add_s (list_t *, void *, size_t); void clist_add_all (list_t *, list_t *); void clist_remove (list_t *, list_item_t *); iterator_t clist_iterator (list_t *); -- cgit v1.2.3