X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=include%2Fecoli_htable.h;h=3e9eab9dd31aa45d87d249ffb6414665bb80f171;hb=70ebe6bd8740d8cb32cd0b0a21ca28a4fa74a2a5;hp=6729d91d161560e41e685bf60c58acfa80899f70;hpb=41bf1ba66e15c00f38375d05e49b31aa70f92349;p=protos%2Flibecoli.git diff --git a/include/ecoli_htable.h b/include/ecoli_htable.h index 6729d91..3e9eab9 100644 --- a/include/ecoli_htable.h +++ b/include/ecoli_htable.h @@ -3,7 +3,10 @@ */ /** - * Simple hash table API + * @defgroup htable Hash table + * @{ + * + * @brief Simple hash table API (any key) * * This file provides functions to store objects in hash tables, * using arbitrary data as keys. @@ -178,9 +181,21 @@ ec_htable_iter_next(struct ec_htable_elt_ref *iter); * The current element key, or NULL if the iterator points to an * invalid element. */ -const char * +const void * ec_htable_iter_get_key(const struct ec_htable_elt_ref *iter); +/** + * Get the key length of the current element. + * + * @param iter + * The hash table iterator. + * @return + * The current element key length, or 0 if the iterator points to an + * invalid element. + */ +size_t +ec_htable_iter_get_key_len(const struct ec_htable_elt_ref *iter); + /** * Get the value of the current element. * @@ -193,5 +208,6 @@ ec_htable_iter_get_key(const struct ec_htable_elt_ref *iter); void * ec_htable_iter_get_val(const struct ec_htable_elt_ref *iter); - #endif + +/** @} */