diff options
| author | Dmitri Pal <dpal@redhat.com> | 2009-09-27 22:18:41 -0400 |
|---|---|---|
| committer | Stephen Gallagher <sgallagh@redhat.com> | 2009-10-05 10:32:07 -0400 |
| commit | 93c4bf8ee18f1b58dc6646e8bb43d536cc824166 (patch) | |
| tree | 59b7f6a9c5ab6aa3ca39c024fa5d5cdb34a97da8 /collection/collection.h | |
| parent | b69cc7a87ade05e1fad38e66f8a772eb3d0ecfb7 (diff) | |
| download | ding-libs2-93c4bf8ee18f1b58dc6646e8bb43d536cc824166.tar.gz ding-libs2-93c4bf8ee18f1b58dc6646e8bb43d536cc824166.tar.xz ding-libs2-93c4bf8ee18f1b58dc6646e8bb43d536cc824166.zip | |
COLLECTION Enhancing hashing and iteration functions
Diffstat (limited to 'collection/collection.h')
| -rw-r--r-- | collection/collection.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/collection/collection.h b/collection/collection.h index be1240c..2e2fe64 100644 --- a/collection/collection.h +++ b/collection/collection.h @@ -498,8 +498,12 @@ uint64_t col_get_item_hash(struct collection_item *ci); * algorithm. Populates "length" with length * of the string not counting 0. * Length argument can be NULL. + * If sub_len is greater than zero + * this value is used to count how many characters + * from string should be included into hash + * calculation. */ -uint64_t col_make_hash(const char *string, int *length); +uint64_t col_make_hash(const char *string, int sub_len, int *length); /* Compare two items. * The second item is evaluated against the first. @@ -745,7 +749,8 @@ int col_get_item_depth(struct collection_iterator *iterator, int *depth); /* Pins down the iterator to loop around current point */ void col_pin_iterator(struct collection_iterator *iterator); -/* FIXME - Do we need to be able to rewind iterator? */ +/* Rewinds iterator to the beginning */ +void col_rewind_iterator(struct collection_iterator *iterator); /* Set collection class */ int col_set_collection_class(struct collection_item *item, /* Collection */ |
