From b8b6830dfd75f6870b2171e7f31cb0cdb927532e Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Tue, 26 Jun 2012 11:22:08 +0200 Subject: Allow passing more complex data to list callbacks Change the data type of the "data" parameter from "long" to "void *" in llist_find_*() signatures to allow for passing more complex objects. Change all llist_find_*() invocations and callbacks accordingly. Signed-off-by: Lukas Fleischer --- src/llist.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/llist.h') diff --git a/src/llist.h b/src/llist.h index c795f37..a786358 100644 --- a/src/llist.h +++ b/src/llist.h @@ -48,7 +48,7 @@ struct llist { }; typedef int (*llist_fn_cmp_t) (void *, void *); -typedef int (*llist_fn_match_t) (void *, long); +typedef int (*llist_fn_match_t) (void *, void *); typedef void (*llist_fn_free_t) (void *); /* Initialization and deallocation. */ @@ -65,10 +65,10 @@ void llist_free_inner(llist_t *, llist_fn_free_t); llist_item_t *llist_first(llist_t *); llist_item_t *llist_nth(llist_t *, int); llist_item_t *llist_next(llist_item_t *); -llist_item_t *llist_next_filter(llist_item_t *, long, llist_fn_match_t); -llist_item_t *llist_find_first(llist_t *, long, llist_fn_match_t); -llist_item_t *llist_find_next(llist_item_t *, long, llist_fn_match_t); -llist_item_t *llist_find_nth(llist_t *, int, long, llist_fn_match_t); +llist_item_t *llist_next_filter(llist_item_t *, void *, llist_fn_match_t); +llist_item_t *llist_find_first(llist_t *, void *, llist_fn_match_t); +llist_item_t *llist_find_next(llist_item_t *, void *, llist_fn_match_t); +llist_item_t *llist_find_nth(llist_t *, int, void *, llist_fn_match_t); #define LLIST_FIRST(l) llist_first(l) #define LLIST_NTH(l, n) llist_nth(l, n) -- cgit v1.2.3-54-g00ecf