diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-07-31 17:59:37 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-07-31 17:59:37 +0000 |
commit | 2fe537c57a8dffd9568f27e5f1a872edc8211994 (patch) | |
tree | 60796031e11856dd72379771e65a5c31035aa77d /src/common/container.h | |
parent | 8ba913c6607f6bc9b82877b3060712165739d22f (diff) | |
download | tor-2fe537c57a8dffd9568f27e5f1a872edc8211994.tar.gz tor-2fe537c57a8dffd9568f27e5f1a872edc8211994.zip |
r6958@Kushana: nickm | 2006-07-29 18:54:15 -0400
Looks like we might need a priority queue.
svn:r6953
Diffstat (limited to 'src/common/container.h')
-rw-r--r-- | src/common/container.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/common/container.h b/src/common/container.h index 1031a6ef13..0b5d0618af 100644 --- a/src/common/container.h +++ b/src/common/container.h @@ -38,6 +38,7 @@ int smartlist_string_num_isin(const smartlist_t *sl, int num); int smartlist_overlap(const smartlist_t *sl1, const smartlist_t *sl2); void smartlist_intersect(smartlist_t *sl1, const smartlist_t *sl2); void smartlist_subtract(smartlist_t *sl1, const smartlist_t *sl2); + /* smartlist_choose() is defined in crypto.[ch] */ #ifdef DEBUG_SMARTLIST /** Return the number of items in sl. @@ -76,6 +77,14 @@ void smartlist_sort_digests(smartlist_t *sl); void *smartlist_bsearch(smartlist_t *sl, const void *key, int (*compare)(const void *key, const void **member)); +void smartlist_pqueue_add(smartlist_t *sl, + int (*compare)(const void *a, const void *b), + void *item); +void *smartlist_pqueue_pop(smartlist_t *sl, + int (*compare)(const void *a, const void *b)); +void smartlist_pqueue_assert_ok(smartlist_t *sl, + int (*compare)(const void *a, const void *b)); + #define SPLIT_SKIP_SPACE 0x01 #define SPLIT_IGNORE_BLANK 0x02 int smartlist_split_string(smartlist_t *sl, const char *str, const char *sep, |