From e58b9c1151c0591a95ebb97e21db315698e0bb27 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 15 Sep 2006 04:27:58 +0000 Subject: r8819@Kushana: nickm | 2006-09-15 00:27:45 -0400 Implement a smartlist_uniq() that will with luck not end the world. svn:r8396 --- src/common/container.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/common/container.h') diff --git a/src/common/container.h b/src/common/container.h index a4cac610d7..5f0417cf4d 100644 --- a/src/common/container.h +++ b/src/common/container.h @@ -74,8 +74,13 @@ void smartlist_del_keeporder(smartlist_t *sl, int idx); void smartlist_insert(smartlist_t *sl, int idx, void *val); void smartlist_sort(smartlist_t *sl, int (*compare)(const void **a, const void **b)); +void smartlist_uniq(smartlist_t *sl, + int (*compare)(const void **a, const void **b), + void (*free_fn)(void *elt)); void smartlist_sort_strings(smartlist_t *sl); void smartlist_sort_digests(smartlist_t *sl); +void smartlist_uniq_strings(smartlist_t *sl); +void smartlist_uniq_digests(smartlist_t *sl); void *smartlist_bsearch(smartlist_t *sl, const void *key, int (*compare)(const void *key, const void **member)) ATTR_PURE; -- cgit v1.2.3-54-g00ecf