X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=src%2Fhashtable.h;h=f03a7690b033dfcfcd29be57193018f069822e08;hb=782acfe378b8d6dddb307029ba97688943312340;hp=e055d9f99551086326cd511cb122ee87385cd892;hpb=08dc8d9bafcb13bb1541894918f4a394e644e6e1;p=jansson.git diff --git a/src/hashtable.h b/src/hashtable.h index e055d9f..f03a769 100644 --- a/src/hashtable.h +++ b/src/hashtable.h @@ -161,6 +161,17 @@ void hashtable_clear(hashtable_t *hashtable); void *hashtable_iter(hashtable_t *hashtable); /** + * hashtable_iter_at - Return an iterator at a specific key + * + * @hashtable: The hashtable object + * @key: The key that the iterator should point to + * + * Like hashtable_iter() but returns an iterator pointing to a + * specific key. + */ +void *hashtable_iter_at(hashtable_t *hashtable, const void *key); + +/** * hashtable_iter_next - Advance an iterator * * @hashtable: The hashtable object @@ -185,4 +196,12 @@ void *hashtable_iter_key(void *iter); */ void *hashtable_iter_value(void *iter); +/** + * hashtable_iter_set - Set the value pointed by an iterator + * + * @iter: The iterator + * @value: The value to set + */ +void hashtable_iter_set(hashtable_t *hashtable, void *iter, void *value); + #endif