summaryrefslogtreecommitdiffstats
path: root/common/collection/collection.h
diff options
context:
space:
mode:
authorDmitri Pal <dpal@redhat.com>2009-09-27 22:18:41 -0400
committerStephen Gallagher <sgallagh@redhat.com>2009-10-05 10:32:07 -0400
commitea7d823fa584b36e9a34a43c32dc476beede5ea2 (patch)
treebf3080e4b0b14c26cf4080d6c6d11d6781a0b471 /common/collection/collection.h
parent26a9c1f22f31a87a83fbb59caea7c7565563f479 (diff)
downloadsssd-ea7d823fa584b36e9a34a43c32dc476beede5ea2.tar.gz
sssd-ea7d823fa584b36e9a34a43c32dc476beede5ea2.tar.xz
sssd-ea7d823fa584b36e9a34a43c32dc476beede5ea2.zip
COLLECTION Enhancing hashing and iteration functions
Diffstat (limited to 'common/collection/collection.h')
-rw-r--r--common/collection/collection.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/common/collection/collection.h b/common/collection/collection.h
index be1240ca5..2e2fe642f 100644
--- a/common/collection/collection.h
+++ b/common/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 */