summaryrefslogtreecommitdiff
path: root/src/common/container.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-09-15 04:27:58 +0000
committerNick Mathewson <nickm@torproject.org>2006-09-15 04:27:58 +0000
commite58b9c1151c0591a95ebb97e21db315698e0bb27 (patch)
treed6ff16e0cdc481cd271d22c6a364cde9634a71f4 /src/common/container.h
parentce83f4362934bbe87341a88d55ff0a1e80014cd5 (diff)
downloadtor-e58b9c1151c0591a95ebb97e21db315698e0bb27.tar.gz
tor-e58b9c1151c0591a95ebb97e21db315698e0bb27.zip
r8819@Kushana: nickm | 2006-09-15 00:27:45 -0400
Implement a smartlist_uniq() that will with luck not end the world. svn:r8396
Diffstat (limited to 'src/common/container.h')
-rw-r--r--src/common/container.h5
1 files changed, 5 insertions, 0 deletions
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;