summaryrefslogtreecommitdiff
path: root/src/llist.h
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2012-06-26 11:22:08 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2012-06-30 14:34:35 +0200
commitb8b6830dfd75f6870b2171e7f31cb0cdb927532e (patch)
treecd3ad69b32150402de8b031f68705fb2f8e99600 /src/llist.h
parent8a85aaafa5905297398605eb890b00d22416eeb5 (diff)
downloadcalcurse-b8b6830dfd75f6870b2171e7f31cb0cdb927532e.zip
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 <calcurse@cryptocrack.de>
Diffstat (limited to 'src/llist.h')
-rw-r--r--src/llist.h10
1 files changed, 5 insertions, 5 deletions
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)