diff options
author | Willow Liquorice <willow@howhill.com> | 2022-08-27 20:07:26 +0100 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2022-08-30 09:42:09 +0200 |
commit | 8c6a68c258061f68466905393b76106436d3dccf (patch) | |
tree | 7ecd4b101fd76859c630a93e54ce6e8e7aecbbb1 /src/util | |
parent | 08a0ef9dff9d401bfaae332a076716c49f85d7ca (diff) | |
download | gnunet-8c6a68c258061f68466905393b76106436d3dccf.tar.gz gnunet-8c6a68c258061f68466905393b76106436d3dccf.zip |
-DOC first pass through UTIL container library
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/container_bloomfilter.c | 11 | ||||
-rw-r--r-- | src/util/container_heap.c | 62 | ||||
-rw-r--r-- | src/util/container_meta_data.c | 70 | ||||
-rw-r--r-- | src/util/container_multihashmap.c | 125 | ||||
-rw-r--r-- | src/util/container_multihashmap32.c | 73 | ||||
-rw-r--r-- | src/util/container_multipeermap.c | 137 | ||||
-rw-r--r-- | src/util/container_multishortmap.c | 112 | ||||
-rw-r--r-- | src/util/container_multiuuidmap.c | 112 |
8 files changed, 0 insertions, 702 deletions
diff --git a/src/util/container_bloomfilter.c b/src/util/container_bloomfilter.c index 9f6c3c0cc..4bfb82d14 100644 --- a/src/util/container_bloomfilter.c +++ b/src/util/container_bloomfilter.c | |||
@@ -467,17 +467,6 @@ testBitCallback (void *cls, | |||
467 | 467 | ||
468 | /* *********************** INTERFACE **************** */ | 468 | /* *********************** INTERFACE **************** */ |
469 | 469 | ||
470 | /** | ||
471 | * Load a bloom-filter from a file. | ||
472 | * | ||
473 | * @param filename the name of the file (or the prefix) | ||
474 | * @param size the size of the bloom-filter (number of | ||
475 | * bytes of storage space to use); will be rounded up | ||
476 | * to next power of 2 | ||
477 | * @param k the number of GNUNET_CRYPTO_hash-functions to apply per | ||
478 | * element (number of bits set per element in the set) | ||
479 | * @return the bloomfilter | ||
480 | */ | ||
481 | struct GNUNET_CONTAINER_BloomFilter * | 470 | struct GNUNET_CONTAINER_BloomFilter * |
482 | GNUNET_CONTAINER_bloomfilter_load (const char *filename, | 471 | GNUNET_CONTAINER_bloomfilter_load (const char *filename, |
483 | size_t size, | 472 | size_t size, |
diff --git a/src/util/container_heap.c b/src/util/container_heap.c index 35d7cd4ab..24f753adb 100644 --- a/src/util/container_heap.c +++ b/src/util/container_heap.c | |||
@@ -129,12 +129,6 @@ check (const struct GNUNET_CONTAINER_HeapNode *node) | |||
129 | #endif | 129 | #endif |
130 | 130 | ||
131 | 131 | ||
132 | /** | ||
133 | * Create a new heap. | ||
134 | * | ||
135 | * @param order how should the heap be sorted? | ||
136 | * @return handle to the heap | ||
137 | */ | ||
138 | struct GNUNET_CONTAINER_Heap * | 132 | struct GNUNET_CONTAINER_Heap * |
139 | GNUNET_CONTAINER_heap_create (enum GNUNET_CONTAINER_HeapOrder order) | 133 | GNUNET_CONTAINER_heap_create (enum GNUNET_CONTAINER_HeapOrder order) |
140 | { | 134 | { |
@@ -146,12 +140,6 @@ GNUNET_CONTAINER_heap_create (enum GNUNET_CONTAINER_HeapOrder order) | |||
146 | } | 140 | } |
147 | 141 | ||
148 | 142 | ||
149 | /** | ||
150 | * Destroys the heap. Only call on a heap that | ||
151 | * is already empty. | ||
152 | * | ||
153 | * @param heap heap to destroy | ||
154 | */ | ||
155 | void | 143 | void |
156 | GNUNET_CONTAINER_heap_destroy (struct GNUNET_CONTAINER_Heap *heap) | 144 | GNUNET_CONTAINER_heap_destroy (struct GNUNET_CONTAINER_Heap *heap) |
157 | { | 145 | { |
@@ -160,12 +148,6 @@ GNUNET_CONTAINER_heap_destroy (struct GNUNET_CONTAINER_Heap *heap) | |||
160 | } | 148 | } |
161 | 149 | ||
162 | 150 | ||
163 | /** | ||
164 | * Get element stored at the root of @a heap. | ||
165 | * | ||
166 | * @param heap Heap to inspect. | ||
167 | * @return Element at the root, or NULL if heap is empty. | ||
168 | */ | ||
169 | void * | 151 | void * |
170 | GNUNET_CONTAINER_heap_peek (const struct GNUNET_CONTAINER_Heap *heap) | 152 | GNUNET_CONTAINER_heap_peek (const struct GNUNET_CONTAINER_Heap *heap) |
171 | { | 153 | { |
@@ -199,12 +181,6 @@ GNUNET_CONTAINER_heap_peek2 (const struct GNUNET_CONTAINER_Heap *heap, | |||
199 | } | 181 | } |
200 | 182 | ||
201 | 183 | ||
202 | /** | ||
203 | * Get the current size of the heap | ||
204 | * | ||
205 | * @param heap the heap to get the size of | ||
206 | * @return number of elements stored | ||
207 | */ | ||
208 | unsigned int | 184 | unsigned int |
209 | GNUNET_CONTAINER_heap_get_size (const struct GNUNET_CONTAINER_Heap *heap) | 185 | GNUNET_CONTAINER_heap_get_size (const struct GNUNET_CONTAINER_Heap *heap) |
210 | { | 186 | { |
@@ -212,12 +188,6 @@ GNUNET_CONTAINER_heap_get_size (const struct GNUNET_CONTAINER_Heap *heap) | |||
212 | } | 188 | } |
213 | 189 | ||
214 | 190 | ||
215 | /** | ||
216 | * Get the current cost of the node | ||
217 | * | ||
218 | * @param node the node to get the cost of | ||
219 | * @return cost of the node | ||
220 | */ | ||
221 | GNUNET_CONTAINER_HeapCostType | 191 | GNUNET_CONTAINER_HeapCostType |
222 | GNUNET_CONTAINER_heap_node_get_cost (const struct GNUNET_CONTAINER_HeapNode | 192 | GNUNET_CONTAINER_heap_node_get_cost (const struct GNUNET_CONTAINER_HeapNode |
223 | *node) | 193 | *node) |
@@ -252,13 +222,6 @@ node_iterator (const struct GNUNET_CONTAINER_Heap *heap, | |||
252 | } | 222 | } |
253 | 223 | ||
254 | 224 | ||
255 | /** | ||
256 | * Iterate over all entries in the heap. | ||
257 | * | ||
258 | * @param heap the heap | ||
259 | * @param iterator function to call on each entry | ||
260 | * @param iterator_cls closure for iterator | ||
261 | */ | ||
262 | void | 225 | void |
263 | GNUNET_CONTAINER_heap_iterate (const struct GNUNET_CONTAINER_Heap *heap, | 226 | GNUNET_CONTAINER_heap_iterate (const struct GNUNET_CONTAINER_Heap *heap, |
264 | GNUNET_CONTAINER_HeapIterator iterator, | 227 | GNUNET_CONTAINER_HeapIterator iterator, |
@@ -268,17 +231,6 @@ GNUNET_CONTAINER_heap_iterate (const struct GNUNET_CONTAINER_Heap *heap, | |||
268 | } | 231 | } |
269 | 232 | ||
270 | 233 | ||
271 | /** | ||
272 | * Perform a random walk of the tree. The walk is biased | ||
273 | * towards elements closer to the root of the tree (since | ||
274 | * each walk starts at the root and ends at a random leaf). | ||
275 | * The heap internally tracks the current position of the | ||
276 | * walk. | ||
277 | * | ||
278 | * @param heap heap to walk | ||
279 | * @return data stored at the next random node in the walk; | ||
280 | * NULL if the tree is empty. | ||
281 | */ | ||
282 | void * | 234 | void * |
283 | GNUNET_CONTAINER_heap_walk_get_next (struct GNUNET_CONTAINER_Heap *heap) | 235 | GNUNET_CONTAINER_heap_walk_get_next (struct GNUNET_CONTAINER_Heap *heap) |
284 | { | 236 | { |
@@ -360,14 +312,6 @@ insert_node (struct GNUNET_CONTAINER_Heap *heap, | |||
360 | } | 312 | } |
361 | 313 | ||
362 | 314 | ||
363 | /** | ||
364 | * Inserts a new element into the heap. | ||
365 | * | ||
366 | * @param heap heap to modify | ||
367 | * @param element element to insert | ||
368 | * @param cost cost for the element | ||
369 | * @return node for the new element | ||
370 | */ | ||
371 | struct GNUNET_CONTAINER_HeapNode * | 315 | struct GNUNET_CONTAINER_HeapNode * |
372 | GNUNET_CONTAINER_heap_insert (struct GNUNET_CONTAINER_Heap *heap, void *element, | 316 | GNUNET_CONTAINER_heap_insert (struct GNUNET_CONTAINER_Heap *heap, void *element, |
373 | GNUNET_CONTAINER_HeapCostType cost) | 317 | GNUNET_CONTAINER_HeapCostType cost) |
@@ -536,12 +480,6 @@ GNUNET_CONTAINER_heap_remove_node (struct GNUNET_CONTAINER_HeapNode *node) | |||
536 | } | 480 | } |
537 | 481 | ||
538 | 482 | ||
539 | /** | ||
540 | * Updates the cost of any node in the tree | ||
541 | * | ||
542 | * @param node node for which the cost is to be changed | ||
543 | * @param new_cost new cost for the node | ||
544 | */ | ||
545 | void | 483 | void |
546 | GNUNET_CONTAINER_heap_update_cost (struct GNUNET_CONTAINER_HeapNode *node, | 484 | GNUNET_CONTAINER_heap_update_cost (struct GNUNET_CONTAINER_HeapNode *node, |
547 | GNUNET_CONTAINER_HeapCostType new_cost) | 485 | GNUNET_CONTAINER_HeapCostType new_cost) |
diff --git a/src/util/container_meta_data.c b/src/util/container_meta_data.c index 2c477db40..52882c5f3 100644 --- a/src/util/container_meta_data.c +++ b/src/util/container_meta_data.c | |||
@@ -241,11 +241,6 @@ invalidate_sbuf (struct GNUNET_CONTAINER_MetaData *md) | |||
241 | } | 241 | } |
242 | 242 | ||
243 | 243 | ||
244 | /** | ||
245 | * Free meta data. | ||
246 | * | ||
247 | * @param md what to free | ||
248 | */ | ||
249 | void | 244 | void |
250 | GNUNET_CONTAINER_meta_data_destroy (struct GNUNET_CONTAINER_MetaData *md) | 245 | GNUNET_CONTAINER_meta_data_destroy (struct GNUNET_CONTAINER_MetaData *md) |
251 | { | 246 | { |
@@ -263,11 +258,6 @@ GNUNET_CONTAINER_meta_data_destroy (struct GNUNET_CONTAINER_MetaData *md) | |||
263 | } | 258 | } |
264 | 259 | ||
265 | 260 | ||
266 | /** | ||
267 | * Remove all items in the container. | ||
268 | * | ||
269 | * @param md metadata to manipulate | ||
270 | */ | ||
271 | void | 261 | void |
272 | GNUNET_CONTAINER_meta_data_clear (struct GNUNET_CONTAINER_MetaData *md) | 262 | GNUNET_CONTAINER_meta_data_clear (struct GNUNET_CONTAINER_MetaData *md) |
273 | { | 263 | { |
@@ -285,16 +275,6 @@ GNUNET_CONTAINER_meta_data_clear (struct GNUNET_CONTAINER_MetaData *md) | |||
285 | } | 275 | } |
286 | 276 | ||
287 | 277 | ||
288 | /** | ||
289 | * Test if two MDs are equal. We consider them equal if | ||
290 | * the meta types, formats and content match (we do not | ||
291 | * include the mime types and plugins names in this | ||
292 | * consideration). | ||
293 | * | ||
294 | * @param md1 first value to check | ||
295 | * @param md2 other value to check | ||
296 | * @return #GNUNET_YES if they are equal | ||
297 | */ | ||
298 | int | 278 | int |
299 | GNUNET_CONTAINER_meta_data_test_equal (const struct GNUNET_CONTAINER_MetaData | 279 | GNUNET_CONTAINER_meta_data_test_equal (const struct GNUNET_CONTAINER_MetaData |
300 | *md1, | 280 | *md1, |
@@ -451,13 +431,6 @@ merge_helper (void *cls, const char *plugin_name, enum EXTRACTOR_MetaType type, | |||
451 | } | 431 | } |
452 | 432 | ||
453 | 433 | ||
454 | /** | ||
455 | * Extend metadata. Merges the meta data from the second argument | ||
456 | * into the first, discarding duplicate key-value pairs. | ||
457 | * | ||
458 | * @param md metadata to extend | ||
459 | * @param in metadata to merge | ||
460 | */ | ||
461 | void | 434 | void |
462 | GNUNET_CONTAINER_meta_data_merge (struct GNUNET_CONTAINER_MetaData *md, | 435 | GNUNET_CONTAINER_meta_data_merge (struct GNUNET_CONTAINER_MetaData *md, |
463 | const struct GNUNET_CONTAINER_MetaData *in) | 436 | const struct GNUNET_CONTAINER_MetaData *in) |
@@ -466,16 +439,6 @@ GNUNET_CONTAINER_meta_data_merge (struct GNUNET_CONTAINER_MetaData *md, | |||
466 | } | 439 | } |
467 | 440 | ||
468 | 441 | ||
469 | /** | ||
470 | * Remove an item. | ||
471 | * | ||
472 | * @param md metadata to manipulate | ||
473 | * @param type type of the item to remove | ||
474 | * @param data specific value to remove, NULL to remove all | ||
475 | * entries of the given type | ||
476 | * @param data_size number of bytes in @a data | ||
477 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if the item does not exist in md | ||
478 | */ | ||
479 | int | 442 | int |
480 | GNUNET_CONTAINER_meta_data_delete (struct GNUNET_CONTAINER_MetaData *md, | 443 | GNUNET_CONTAINER_meta_data_delete (struct GNUNET_CONTAINER_MetaData *md, |
481 | enum EXTRACTOR_MetaType type, | 444 | enum EXTRACTOR_MetaType type, |
@@ -503,12 +466,6 @@ GNUNET_CONTAINER_meta_data_delete (struct GNUNET_CONTAINER_MetaData *md, | |||
503 | } | 466 | } |
504 | 467 | ||
505 | 468 | ||
506 | /** | ||
507 | * Add the current time as the publication date | ||
508 | * to the meta-data. | ||
509 | * | ||
510 | * @param md metadata to modify | ||
511 | */ | ||
512 | void | 469 | void |
513 | GNUNET_CONTAINER_meta_data_add_publication_date (struct | 470 | GNUNET_CONTAINER_meta_data_add_publication_date (struct |
514 | GNUNET_CONTAINER_MetaData *md) | 471 | GNUNET_CONTAINER_MetaData *md) |
@@ -556,16 +513,6 @@ GNUNET_CONTAINER_meta_data_iterate (const struct GNUNET_CONTAINER_MetaData *md, | |||
556 | } | 513 | } |
557 | 514 | ||
558 | 515 | ||
559 | /** | ||
560 | * Get the first MD entry of the given type. Caller | ||
561 | * is responsible for freeing the return value. | ||
562 | * Also, only meta data items that are strings (0-terminated) | ||
563 | * are returned by this function. | ||
564 | * | ||
565 | * @param md metadata to inspect | ||
566 | * @param type type to look for | ||
567 | * @return NULL if no entry was found | ||
568 | */ | ||
569 | char * | 516 | char * |
570 | GNUNET_CONTAINER_meta_data_get_by_type (const struct | 517 | GNUNET_CONTAINER_meta_data_get_by_type (const struct |
571 | GNUNET_CONTAINER_MetaData *md, | 518 | GNUNET_CONTAINER_MetaData *md, |
@@ -584,17 +531,6 @@ GNUNET_CONTAINER_meta_data_get_by_type (const struct | |||
584 | } | 531 | } |
585 | 532 | ||
586 | 533 | ||
587 | /** | ||
588 | * Get the first matching MD entry of the given types. Caller is | ||
589 | * responsible for freeing the return value. Also, only meta data | ||
590 | * items that are strings (0-terminated) are returned by this | ||
591 | * function. | ||
592 | * | ||
593 | * @param md metadata to inspect | ||
594 | * @param ... -1-terminated list of types | ||
595 | * @return NULL if we do not have any such entry, | ||
596 | * otherwise client is responsible for freeing the value! | ||
597 | */ | ||
598 | char * | 534 | char * |
599 | GNUNET_CONTAINER_meta_data_get_first_by_types (const struct | 535 | GNUNET_CONTAINER_meta_data_get_first_by_types (const struct |
600 | GNUNET_CONTAINER_MetaData *md, | 536 | GNUNET_CONTAINER_MetaData *md, |
@@ -997,12 +933,6 @@ GNUNET_CONTAINER_meta_data_serialize (const struct GNUNET_CONTAINER_MetaData | |||
997 | } | 933 | } |
998 | 934 | ||
999 | 935 | ||
1000 | /** | ||
1001 | * Get the size of the full meta-data in serialized form. | ||
1002 | * | ||
1003 | * @param md metadata to inspect | ||
1004 | * @return number of bytes needed for serialization, -1 on error | ||
1005 | */ | ||
1006 | ssize_t | 936 | ssize_t |
1007 | GNUNET_CONTAINER_meta_data_get_serialized_size (const struct | 937 | GNUNET_CONTAINER_meta_data_get_serialized_size (const struct |
1008 | GNUNET_CONTAINER_MetaData *md) | 938 | GNUNET_CONTAINER_MetaData *md) |
diff --git a/src/util/container_multihashmap.c b/src/util/container_multihashmap.c index 08893d81f..8b1deac12 100644 --- a/src/util/container_multihashmap.c +++ b/src/util/container_multihashmap.c | |||
@@ -175,21 +175,6 @@ struct GNUNET_CONTAINER_MultiHashMapIterator | |||
175 | }; | 175 | }; |
176 | 176 | ||
177 | 177 | ||
178 | /** | ||
179 | * Create a multi hash map. | ||
180 | * | ||
181 | * @param len initial size (map will grow as needed) | ||
182 | * @param do_not_copy_keys #GNUNET_NO is always safe and should be used by default; | ||
183 | * #GNUNET_YES means that on 'put', the 'key' does not have | ||
184 | * to be copied as the destination of the pointer is | ||
185 | * guaranteed to be life as long as the value is stored in | ||
186 | * the hashmap. This can significantly reduce memory | ||
187 | * consumption, but of course is also a recipe for | ||
188 | * heap corruption if the assumption is not true. Only | ||
189 | * use this if (1) memory use is important in this case and | ||
190 | * (2) you have triple-checked that the invariant holds | ||
191 | * @return NULL on error | ||
192 | */ | ||
193 | struct GNUNET_CONTAINER_MultiHashMap * | 178 | struct GNUNET_CONTAINER_MultiHashMap * |
194 | GNUNET_CONTAINER_multihashmap_create (unsigned int len, int do_not_copy_keys) | 179 | GNUNET_CONTAINER_multihashmap_create (unsigned int len, int do_not_copy_keys) |
195 | { | 180 | { |
@@ -225,12 +210,6 @@ GNUNET_CONTAINER_multihashmap_create (unsigned int len, int do_not_copy_keys) | |||
225 | } | 210 | } |
226 | 211 | ||
227 | 212 | ||
228 | /** | ||
229 | * Destroy a hash map. Will not free any values stored in the hash | ||
230 | * map! | ||
231 | * | ||
232 | * @param map the map | ||
233 | */ | ||
234 | void | 213 | void |
235 | GNUNET_CONTAINER_multihashmap_destroy ( | 214 | GNUNET_CONTAINER_multihashmap_destroy ( |
236 | struct GNUNET_CONTAINER_MultiHashMap *map) | 215 | struct GNUNET_CONTAINER_MultiHashMap *map) |
@@ -289,12 +268,6 @@ idx_of (const struct GNUNET_CONTAINER_MultiHashMap *map, | |||
289 | } | 268 | } |
290 | 269 | ||
291 | 270 | ||
292 | /** | ||
293 | * Get the number of key-value pairs in the map. | ||
294 | * | ||
295 | * @param map the map | ||
296 | * @return the number of key value pairs | ||
297 | */ | ||
298 | unsigned int | 271 | unsigned int |
299 | GNUNET_CONTAINER_multihashmap_size ( | 272 | GNUNET_CONTAINER_multihashmap_size ( |
300 | const struct GNUNET_CONTAINER_MultiHashMap *map) | 273 | const struct GNUNET_CONTAINER_MultiHashMap *map) |
@@ -303,16 +276,6 @@ GNUNET_CONTAINER_multihashmap_size ( | |||
303 | } | 276 | } |
304 | 277 | ||
305 | 278 | ||
306 | /** | ||
307 | * Given a key find a value in the map matching the key. | ||
308 | * | ||
309 | * @param map the map | ||
310 | * @param key what to look for | ||
311 | * @return NULL if no value was found; note that | ||
312 | * this is indistinguishable from values that just | ||
313 | * happen to be NULL; use "contains" to test for | ||
314 | * key-value pairs with value NULL | ||
315 | */ | ||
316 | void * | 279 | void * |
317 | GNUNET_CONTAINER_multihashmap_get ( | 280 | GNUNET_CONTAINER_multihashmap_get ( |
318 | const struct GNUNET_CONTAINER_MultiHashMap *map, | 281 | const struct GNUNET_CONTAINER_MultiHashMap *map, |
@@ -341,15 +304,6 @@ GNUNET_CONTAINER_multihashmap_get ( | |||
341 | } | 304 | } |
342 | 305 | ||
343 | 306 | ||
344 | /** | ||
345 | * Iterate over all entries in the map. | ||
346 | * | ||
347 | * @param map the map | ||
348 | * @param it function to call on each entry | ||
349 | * @param it_cls extra argument to @a it | ||
350 | * @return the number of key value pairs processed, | ||
351 | * #GNUNET_SYSERR if it aborted iteration | ||
352 | */ | ||
353 | int | 307 | int |
354 | GNUNET_CONTAINER_multihashmap_iterate ( | 308 | GNUNET_CONTAINER_multihashmap_iterate ( |
355 | struct GNUNET_CONTAINER_MultiHashMap *map, | 309 | struct GNUNET_CONTAINER_MultiHashMap *map, |
@@ -447,17 +401,6 @@ update_next_cache_sme (struct GNUNET_CONTAINER_MultiHashMap *map, | |||
447 | } | 401 | } |
448 | 402 | ||
449 | 403 | ||
450 | /** | ||
451 | * Remove the given key-value pair from the map. Note that if the | ||
452 | * key-value pair is in the map multiple times, only one of the pairs | ||
453 | * will be removed. | ||
454 | * | ||
455 | * @param map the map | ||
456 | * @param key key of the key-value pair | ||
457 | * @param value value of the key-value pair | ||
458 | * @return #GNUNET_YES on success, #GNUNET_NO if the key-value pair | ||
459 | * is not in the map | ||
460 | */ | ||
461 | int | 404 | int |
462 | GNUNET_CONTAINER_multihashmap_remove (struct GNUNET_CONTAINER_MultiHashMap *map, | 405 | GNUNET_CONTAINER_multihashmap_remove (struct GNUNET_CONTAINER_MultiHashMap *map, |
463 | const struct GNUNET_HashCode *key, | 406 | const struct GNUNET_HashCode *key, |
@@ -516,14 +459,6 @@ GNUNET_CONTAINER_multihashmap_remove (struct GNUNET_CONTAINER_MultiHashMap *map, | |||
516 | } | 459 | } |
517 | 460 | ||
518 | 461 | ||
519 | /** | ||
520 | * Remove all entries for the given key from the map. | ||
521 | * Note that the values would not be "freed". | ||
522 | * | ||
523 | * @param map the map | ||
524 | * @param key identifies values to be removed | ||
525 | * @return number of values removed | ||
526 | */ | ||
527 | int | 462 | int |
528 | GNUNET_CONTAINER_multihashmap_remove_all ( | 463 | GNUNET_CONTAINER_multihashmap_remove_all ( |
529 | struct GNUNET_CONTAINER_MultiHashMap *map, | 464 | struct GNUNET_CONTAINER_MultiHashMap *map, |
@@ -642,15 +577,6 @@ GNUNET_CONTAINER_multihashmap_clear (struct GNUNET_CONTAINER_MultiHashMap *map) | |||
642 | } | 577 | } |
643 | 578 | ||
644 | 579 | ||
645 | /** | ||
646 | * Check if the map contains any value under the given | ||
647 | * key (including values that are NULL). | ||
648 | * | ||
649 | * @param map the map | ||
650 | * @param key the key to test if a value exists for it | ||
651 | * @return #GNUNET_YES if such a value exists, | ||
652 | * #GNUNET_NO if not | ||
653 | */ | ||
654 | int | 580 | int |
655 | GNUNET_CONTAINER_multihashmap_contains ( | 581 | GNUNET_CONTAINER_multihashmap_contains ( |
656 | const struct GNUNET_CONTAINER_MultiHashMap *map, | 582 | const struct GNUNET_CONTAINER_MultiHashMap *map, |
@@ -679,16 +605,6 @@ GNUNET_CONTAINER_multihashmap_contains ( | |||
679 | } | 605 | } |
680 | 606 | ||
681 | 607 | ||
682 | /** | ||
683 | * Check if the map contains the given value under the given | ||
684 | * key. | ||
685 | * | ||
686 | * @param map the map | ||
687 | * @param key the key to test if a value exists for it | ||
688 | * @param value value to test for | ||
689 | * @return #GNUNET_YES if such a value exists, | ||
690 | * #GNUNET_NO if not | ||
691 | */ | ||
692 | int | 608 | int |
693 | GNUNET_CONTAINER_multihashmap_contains_value ( | 609 | GNUNET_CONTAINER_multihashmap_contains_value ( |
694 | const struct GNUNET_CONTAINER_MultiHashMap *map, | 610 | const struct GNUNET_CONTAINER_MultiHashMap *map, |
@@ -860,16 +776,6 @@ GNUNET_CONTAINER_multihashmap_put (struct GNUNET_CONTAINER_MultiHashMap *map, | |||
860 | } | 776 | } |
861 | 777 | ||
862 | 778 | ||
863 | /** | ||
864 | * Iterate over all entries in the map that match a particular key. | ||
865 | * | ||
866 | * @param map the map | ||
867 | * @param key key that the entries must correspond to | ||
868 | * @param it function to call on each entry | ||
869 | * @param it_cls extra argument to it | ||
870 | * @return the number of key value pairs processed, | ||
871 | * #GNUNET_SYSERR if it aborted iteration | ||
872 | */ | ||
873 | int | 779 | int |
874 | GNUNET_CONTAINER_multihashmap_get_multiple ( | 780 | GNUNET_CONTAINER_multihashmap_get_multiple ( |
875 | struct GNUNET_CONTAINER_MultiHashMap *map, | 781 | struct GNUNET_CONTAINER_MultiHashMap *map, |
@@ -997,18 +903,6 @@ GNUNET_CONTAINER_multihashmap_get_random ( | |||
997 | } | 903 | } |
998 | 904 | ||
999 | 905 | ||
1000 | /** | ||
1001 | * Create an iterator for a multihashmap. | ||
1002 | * The iterator can be used to retrieve all the elements in the multihashmap | ||
1003 | * one by one, without having to handle all elements at once (in contrast to | ||
1004 | * GNUNET_CONTAINER_multihashmap_iterate()). Note that the iterator can not be | ||
1005 | * used anymore if elements have been removed from 'map' after the creation of | ||
1006 | * the iterator, or 'map' has been destroyed. Adding elements to 'map' may | ||
1007 | * result in skipped or repeated elements. | ||
1008 | * | ||
1009 | * @param map the map to create an iterator for | ||
1010 | * @return an iterator over the given multihashmap 'map' | ||
1011 | */ | ||
1012 | struct GNUNET_CONTAINER_MultiHashMapIterator * | 906 | struct GNUNET_CONTAINER_MultiHashMapIterator * |
1013 | GNUNET_CONTAINER_multihashmap_iterator_create ( | 907 | GNUNET_CONTAINER_multihashmap_iterator_create ( |
1014 | const struct GNUNET_CONTAINER_MultiHashMap *map) | 908 | const struct GNUNET_CONTAINER_MultiHashMap *map) |
@@ -1023,20 +917,6 @@ GNUNET_CONTAINER_multihashmap_iterator_create ( | |||
1023 | } | 917 | } |
1024 | 918 | ||
1025 | 919 | ||
1026 | /** | ||
1027 | * Retrieve the next element from the hash map at the iterator's position. | ||
1028 | * If there are no elements left, GNUNET_NO is returned, and 'key' and 'value' | ||
1029 | * are not modified. | ||
1030 | * This operation is only allowed if no elements have been removed from the | ||
1031 | * multihashmap since the creation of 'iter', and the map has not been destroyed. | ||
1032 | * Adding elements may result in repeating or skipping elements. | ||
1033 | * | ||
1034 | * @param iter the iterator to get the next element from | ||
1035 | * @param key pointer to store the key in, can be NULL | ||
1036 | * @param value pointer to store the value in, can be NULL | ||
1037 | * @return #GNUNET_YES we returned an element, | ||
1038 | * #GNUNET_NO if we are out of elements | ||
1039 | */ | ||
1040 | int | 920 | int |
1041 | GNUNET_CONTAINER_multihashmap_iterator_next ( | 921 | GNUNET_CONTAINER_multihashmap_iterator_next ( |
1042 | struct GNUNET_CONTAINER_MultiHashMapIterator *iter, | 922 | struct GNUNET_CONTAINER_MultiHashMapIterator *iter, |
@@ -1082,11 +962,6 @@ GNUNET_CONTAINER_multihashmap_iterator_next ( | |||
1082 | } | 962 | } |
1083 | 963 | ||
1084 | 964 | ||
1085 | /** | ||
1086 | * Destroy a multihashmap iterator. | ||
1087 | * | ||
1088 | * @param iter the iterator to destroy | ||
1089 | */ | ||
1090 | void | 965 | void |
1091 | GNUNET_CONTAINER_multihashmap_iterator_destroy ( | 966 | GNUNET_CONTAINER_multihashmap_iterator_destroy ( |
1092 | struct GNUNET_CONTAINER_MultiHashMapIterator *iter) | 967 | struct GNUNET_CONTAINER_MultiHashMapIterator *iter) |
diff --git a/src/util/container_multihashmap32.c b/src/util/container_multihashmap32.c index f349a5f80..ccedd1bbb 100644 --- a/src/util/container_multihashmap32.c +++ b/src/util/container_multihashmap32.c | |||
@@ -195,12 +195,6 @@ idx_of (const struct GNUNET_CONTAINER_MultiHashMap32 *m, const uint32_t key) | |||
195 | } | 195 | } |
196 | 196 | ||
197 | 197 | ||
198 | /** | ||
199 | * Get the number of key-value pairs in the map. | ||
200 | * | ||
201 | * @param map the map | ||
202 | * @return the number of key value pairs | ||
203 | */ | ||
204 | unsigned int | 198 | unsigned int |
205 | GNUNET_CONTAINER_multihashmap32_size ( | 199 | GNUNET_CONTAINER_multihashmap32_size ( |
206 | const struct GNUNET_CONTAINER_MultiHashMap32 *map) | 200 | const struct GNUNET_CONTAINER_MultiHashMap32 *map) |
@@ -209,16 +203,6 @@ GNUNET_CONTAINER_multihashmap32_size ( | |||
209 | } | 203 | } |
210 | 204 | ||
211 | 205 | ||
212 | /** | ||
213 | * Given a key find a value in the map matching the key. | ||
214 | * | ||
215 | * @param map the map | ||
216 | * @param key what to look for | ||
217 | * @return NULL if no value was found; note that | ||
218 | * this is indistinguishable from values that just | ||
219 | * happen to be NULL; use "contains" to test for | ||
220 | * key-value pairs with value NULL | ||
221 | */ | ||
222 | void * | 206 | void * |
223 | GNUNET_CONTAINER_multihashmap32_get ( | 207 | GNUNET_CONTAINER_multihashmap32_get ( |
224 | const struct GNUNET_CONTAINER_MultiHashMap32 *map, | 208 | const struct GNUNET_CONTAINER_MultiHashMap32 *map, |
@@ -237,15 +221,6 @@ GNUNET_CONTAINER_multihashmap32_get ( | |||
237 | } | 221 | } |
238 | 222 | ||
239 | 223 | ||
240 | /** | ||
241 | * Iterate over all entries in the map. | ||
242 | * | ||
243 | * @param map the map | ||
244 | * @param it function to call on each entry | ||
245 | * @param it_cls extra argument to @a it | ||
246 | * @return the number of key value pairs processed, | ||
247 | * #GNUNET_SYSERR if it aborted iteration | ||
248 | */ | ||
249 | int | 224 | int |
250 | GNUNET_CONTAINER_multihashmap32_iterate ( | 225 | GNUNET_CONTAINER_multihashmap32_iterate ( |
251 | struct GNUNET_CONTAINER_MultiHashMap32 *map, | 226 | struct GNUNET_CONTAINER_MultiHashMap32 *map, |
@@ -300,17 +275,6 @@ update_next_cache (struct GNUNET_CONTAINER_MultiHashMap32 *map, | |||
300 | } | 275 | } |
301 | 276 | ||
302 | 277 | ||
303 | /** | ||
304 | * Remove the given key-value pair from the map. Note that if the | ||
305 | * key-value pair is in the map multiple times, only one of the pairs | ||
306 | * will be removed. | ||
307 | * | ||
308 | * @param map the map | ||
309 | * @param key key of the key-value pair | ||
310 | * @param value value of the key-value pair | ||
311 | * @return #GNUNET_YES on success, #GNUNET_NO if the key-value pair | ||
312 | * is not in the map | ||
313 | */ | ||
314 | int | 278 | int |
315 | GNUNET_CONTAINER_multihashmap32_remove ( | 279 | GNUNET_CONTAINER_multihashmap32_remove ( |
316 | struct GNUNET_CONTAINER_MultiHashMap32 *map, | 280 | struct GNUNET_CONTAINER_MultiHashMap32 *map, |
@@ -346,14 +310,6 @@ GNUNET_CONTAINER_multihashmap32_remove ( | |||
346 | } | 310 | } |
347 | 311 | ||
348 | 312 | ||
349 | /** | ||
350 | * Remove all entries for the given key from the map. | ||
351 | * Note that the values would not be "freed". | ||
352 | * | ||
353 | * @param map the map | ||
354 | * @param key identifies values to be removed | ||
355 | * @return number of values removed | ||
356 | */ | ||
357 | int | 313 | int |
358 | GNUNET_CONTAINER_multihashmap32_remove_all ( | 314 | GNUNET_CONTAINER_multihashmap32_remove_all ( |
359 | struct GNUNET_CONTAINER_MultiHashMap32 *map, | 315 | struct GNUNET_CONTAINER_MultiHashMap32 *map, |
@@ -397,15 +353,6 @@ GNUNET_CONTAINER_multihashmap32_remove_all ( | |||
397 | } | 353 | } |
398 | 354 | ||
399 | 355 | ||
400 | /** | ||
401 | * Check if the map contains any value under the given | ||
402 | * key (including values that are NULL). | ||
403 | * | ||
404 | * @param map the map | ||
405 | * @param key the key to test if a value exists for it | ||
406 | * @return #GNUNET_YES if such a value exists, | ||
407 | * #GNUNET_NO if not | ||
408 | */ | ||
409 | int | 356 | int |
410 | GNUNET_CONTAINER_multihashmap32_contains ( | 357 | GNUNET_CONTAINER_multihashmap32_contains ( |
411 | const struct GNUNET_CONTAINER_MultiHashMap32 *map, | 358 | const struct GNUNET_CONTAINER_MultiHashMap32 *map, |
@@ -424,16 +371,6 @@ GNUNET_CONTAINER_multihashmap32_contains ( | |||
424 | } | 371 | } |
425 | 372 | ||
426 | 373 | ||
427 | /** | ||
428 | * Check if the map contains the given value under the given | ||
429 | * key. | ||
430 | * | ||
431 | * @param map the map | ||
432 | * @param key the key to test if a value exists for it | ||
433 | * @param value value to test for | ||
434 | * @return #GNUNET_YES if such a value exists, | ||
435 | * #GNUNET_NO if not | ||
436 | */ | ||
437 | int | 374 | int |
438 | GNUNET_CONTAINER_multihashmap32_contains_value ( | 375 | GNUNET_CONTAINER_multihashmap32_contains_value ( |
439 | const struct GNUNET_CONTAINER_MultiHashMap32 *map, | 376 | const struct GNUNET_CONTAINER_MultiHashMap32 *map, |
@@ -549,16 +486,6 @@ GNUNET_CONTAINER_multihashmap32_put ( | |||
549 | } | 486 | } |
550 | 487 | ||
551 | 488 | ||
552 | /** | ||
553 | * Iterate over all entries in the map that match a particular key. | ||
554 | * | ||
555 | * @param map the map | ||
556 | * @param key key that the entries must correspond to | ||
557 | * @param it function to call on each entry | ||
558 | * @param it_cls extra argument to @a it | ||
559 | * @return the number of key value pairs processed, | ||
560 | * GNUNET_SYSERR if it aborted iteration | ||
561 | */ | ||
562 | int | 489 | int |
563 | GNUNET_CONTAINER_multihashmap32_get_multiple ( | 490 | GNUNET_CONTAINER_multihashmap32_get_multiple ( |
564 | struct GNUNET_CONTAINER_MultiHashMap32 *map, | 491 | struct GNUNET_CONTAINER_MultiHashMap32 *map, |
diff --git a/src/util/container_multipeermap.c b/src/util/container_multipeermap.c index fa4d2210b..976f172e1 100644 --- a/src/util/container_multipeermap.c +++ b/src/util/container_multipeermap.c | |||
@@ -174,21 +174,6 @@ struct GNUNET_CONTAINER_MultiPeerMapIterator | |||
174 | }; | 174 | }; |
175 | 175 | ||
176 | 176 | ||
177 | /** | ||
178 | * Create a multi hash map. | ||
179 | * | ||
180 | * @param len initial size (map will grow as needed) | ||
181 | * @param do_not_copy_keys GNUNET_NO is always safe and should be used by default; | ||
182 | * GNUNET_YES means that on 'put', the 'key' does not have | ||
183 | * to be copied as the destination of the pointer is | ||
184 | * guaranteed to be life as long as the value is stored in | ||
185 | * the hashmap. This can significantly reduce memory | ||
186 | * consumption, but of course is also a recipe for | ||
187 | * heap corruption if the assumption is not true. Only | ||
188 | * use this if (1) memory use is important in this case and | ||
189 | * (2) you have triple-checked that the invariant holds | ||
190 | * @return NULL on error | ||
191 | */ | ||
192 | struct GNUNET_CONTAINER_MultiPeerMap * | 177 | struct GNUNET_CONTAINER_MultiPeerMap * |
193 | GNUNET_CONTAINER_multipeermap_create (unsigned int len, | 178 | GNUNET_CONTAINER_multipeermap_create (unsigned int len, |
194 | int do_not_copy_keys) | 179 | int do_not_copy_keys) |
@@ -209,12 +194,6 @@ GNUNET_CONTAINER_multipeermap_create (unsigned int len, | |||
209 | } | 194 | } |
210 | 195 | ||
211 | 196 | ||
212 | /** | ||
213 | * Destroy a hash map. Will not free any values | ||
214 | * stored in the hash map! | ||
215 | * | ||
216 | * @param map the map | ||
217 | */ | ||
218 | void | 197 | void |
219 | GNUNET_CONTAINER_multipeermap_destroy ( | 198 | GNUNET_CONTAINER_multipeermap_destroy ( |
220 | struct GNUNET_CONTAINER_MultiPeerMap *map) | 199 | struct GNUNET_CONTAINER_MultiPeerMap *map) |
@@ -276,12 +255,6 @@ idx_of (const struct GNUNET_CONTAINER_MultiPeerMap *map, | |||
276 | } | 255 | } |
277 | 256 | ||
278 | 257 | ||
279 | /** | ||
280 | * Get the number of key-value pairs in the map. | ||
281 | * | ||
282 | * @param map the map | ||
283 | * @return the number of key value pairs | ||
284 | */ | ||
285 | unsigned int | 258 | unsigned int |
286 | GNUNET_CONTAINER_multipeermap_size ( | 259 | GNUNET_CONTAINER_multipeermap_size ( |
287 | const struct GNUNET_CONTAINER_MultiPeerMap *map) | 260 | const struct GNUNET_CONTAINER_MultiPeerMap *map) |
@@ -290,16 +263,6 @@ GNUNET_CONTAINER_multipeermap_size ( | |||
290 | } | 263 | } |
291 | 264 | ||
292 | 265 | ||
293 | /** | ||
294 | * Given a key find a value in the map matching the key. | ||
295 | * | ||
296 | * @param map the map | ||
297 | * @param key what to look for | ||
298 | * @return NULL if no value was found; note that | ||
299 | * this is indistinguishable from values that just | ||
300 | * happen to be NULL; use "contains" to test for | ||
301 | * key-value pairs with value NULL | ||
302 | */ | ||
303 | void * | 266 | void * |
304 | GNUNET_CONTAINER_multipeermap_get ( | 267 | GNUNET_CONTAINER_multipeermap_get ( |
305 | const struct GNUNET_CONTAINER_MultiPeerMap *map, | 268 | const struct GNUNET_CONTAINER_MultiPeerMap *map, |
@@ -324,15 +287,6 @@ GNUNET_CONTAINER_multipeermap_get ( | |||
324 | } | 287 | } |
325 | 288 | ||
326 | 289 | ||
327 | /** | ||
328 | * Iterate over all entries in the map. | ||
329 | * | ||
330 | * @param map the map | ||
331 | * @param it function to call on each entry | ||
332 | * @param it_cls extra argument to @a it | ||
333 | * @return the number of key value pairs processed, | ||
334 | * #GNUNET_SYSERR if it aborted iteration | ||
335 | */ | ||
336 | int | 290 | int |
337 | GNUNET_CONTAINER_multipeermap_iterate ( | 291 | GNUNET_CONTAINER_multipeermap_iterate ( |
338 | struct GNUNET_CONTAINER_MultiPeerMap *map, | 292 | struct GNUNET_CONTAINER_MultiPeerMap *map, |
@@ -430,17 +384,6 @@ update_next_cache_sme (struct GNUNET_CONTAINER_MultiPeerMap *map, | |||
430 | } | 384 | } |
431 | 385 | ||
432 | 386 | ||
433 | /** | ||
434 | * Remove the given key-value pair from the map. Note that if the | ||
435 | * key-value pair is in the map multiple times, only one of the pairs | ||
436 | * will be removed. | ||
437 | * | ||
438 | * @param map the map | ||
439 | * @param key key of the key-value pair | ||
440 | * @param value value of the key-value pair | ||
441 | * @return #GNUNET_YES on success, #GNUNET_NO if the key-value pair | ||
442 | * is not in the map | ||
443 | */ | ||
444 | int | 387 | int |
445 | GNUNET_CONTAINER_multipeermap_remove (struct GNUNET_CONTAINER_MultiPeerMap *map, | 388 | GNUNET_CONTAINER_multipeermap_remove (struct GNUNET_CONTAINER_MultiPeerMap *map, |
446 | const struct GNUNET_PeerIdentity *key, | 389 | const struct GNUNET_PeerIdentity *key, |
@@ -496,14 +439,6 @@ GNUNET_CONTAINER_multipeermap_remove (struct GNUNET_CONTAINER_MultiPeerMap *map, | |||
496 | } | 439 | } |
497 | 440 | ||
498 | 441 | ||
499 | /** | ||
500 | * Remove all entries for the given key from the map. | ||
501 | * Note that the values would not be "freed". | ||
502 | * | ||
503 | * @param map the map | ||
504 | * @param key identifies values to be removed | ||
505 | * @return number of values removed | ||
506 | */ | ||
507 | int | 442 | int |
508 | GNUNET_CONTAINER_multipeermap_remove_all ( | 443 | GNUNET_CONTAINER_multipeermap_remove_all ( |
509 | struct GNUNET_CONTAINER_MultiPeerMap *map, | 444 | struct GNUNET_CONTAINER_MultiPeerMap *map, |
@@ -584,15 +519,6 @@ GNUNET_CONTAINER_multipeermap_remove_all ( | |||
584 | } | 519 | } |
585 | 520 | ||
586 | 521 | ||
587 | /** | ||
588 | * Check if the map contains any value under the given | ||
589 | * key (including values that are NULL). | ||
590 | * | ||
591 | * @param map the map | ||
592 | * @param key the key to test if a value exists for it | ||
593 | * @return #GNUNET_YES if such a value exists, | ||
594 | * #GNUNET_NO if not | ||
595 | */ | ||
596 | int | 522 | int |
597 | GNUNET_CONTAINER_multipeermap_contains ( | 523 | GNUNET_CONTAINER_multipeermap_contains ( |
598 | const struct GNUNET_CONTAINER_MultiPeerMap *map, | 524 | const struct GNUNET_CONTAINER_MultiPeerMap *map, |
@@ -617,16 +543,6 @@ GNUNET_CONTAINER_multipeermap_contains ( | |||
617 | } | 543 | } |
618 | 544 | ||
619 | 545 | ||
620 | /** | ||
621 | * Check if the map contains the given value under the given | ||
622 | * key. | ||
623 | * | ||
624 | * @param map the map | ||
625 | * @param key the key to test if a value exists for it | ||
626 | * @param value value to test for | ||
627 | * @return #GNUNET_YES if such a value exists, | ||
628 | * #GNUNET_NO if not | ||
629 | */ | ||
630 | int | 546 | int |
631 | GNUNET_CONTAINER_multipeermap_contains_value ( | 547 | GNUNET_CONTAINER_multipeermap_contains_value ( |
632 | const struct GNUNET_CONTAINER_MultiPeerMap *map, | 548 | const struct GNUNET_CONTAINER_MultiPeerMap *map, |
@@ -711,18 +627,6 @@ grow (struct GNUNET_CONTAINER_MultiPeerMap *map) | |||
711 | } | 627 | } |
712 | 628 | ||
713 | 629 | ||
714 | /** | ||
715 | * Store a key-value pair in the map. | ||
716 | * | ||
717 | * @param map the map | ||
718 | * @param key key to use | ||
719 | * @param value value to use | ||
720 | * @param opt options for put | ||
721 | * @return #GNUNET_OK on success, | ||
722 | * #GNUNET_NO if a value was replaced (with REPLACE) | ||
723 | * #GNUNET_SYSERR if #GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY was the option and the | ||
724 | * value already exists | ||
725 | */ | ||
726 | int | 630 | int |
727 | GNUNET_CONTAINER_multipeermap_put (struct GNUNET_CONTAINER_MultiPeerMap *map, | 631 | GNUNET_CONTAINER_multipeermap_put (struct GNUNET_CONTAINER_MultiPeerMap *map, |
728 | const struct GNUNET_PeerIdentity *key, | 632 | const struct GNUNET_PeerIdentity *key, |
@@ -794,16 +698,6 @@ GNUNET_CONTAINER_multipeermap_put (struct GNUNET_CONTAINER_MultiPeerMap *map, | |||
794 | } | 698 | } |
795 | 699 | ||
796 | 700 | ||
797 | /** | ||
798 | * Iterate over all entries in the map that match a particular key. | ||
799 | * | ||
800 | * @param map the map | ||
801 | * @param key key that the entries must correspond to | ||
802 | * @param it function to call on each entry | ||
803 | * @param it_cls extra argument to @a it | ||
804 | * @return the number of key value pairs processed, | ||
805 | * #GNUNET_SYSERR if it aborted iteration | ||
806 | */ | ||
807 | int | 701 | int |
808 | GNUNET_CONTAINER_multipeermap_get_multiple ( | 702 | GNUNET_CONTAINER_multipeermap_get_multiple ( |
809 | struct GNUNET_CONTAINER_MultiPeerMap *map, | 703 | struct GNUNET_CONTAINER_MultiPeerMap *map, |
@@ -930,18 +824,6 @@ GNUNET_CONTAINER_multipeermap_get_random ( | |||
930 | } | 824 | } |
931 | 825 | ||
932 | 826 | ||
933 | /** | ||
934 | * Create an iterator for a multipeermap. | ||
935 | * The iterator can be used to retrieve all the elements in the multipeermap | ||
936 | * one by one, without having to handle all elements at once (in contrast to | ||
937 | * #GNUNET_CONTAINER_multipeermap_iterate). Note that the iterator can not be | ||
938 | * used anymore if elements have been removed from 'map' after the creation of | ||
939 | * the iterator, or 'map' has been destroyed. Adding elements to 'map' may | ||
940 | * result in skipped or repeated elements. | ||
941 | * | ||
942 | * @param map the map to create an iterator for | ||
943 | * @return an iterator over the given multipeermap 'map' | ||
944 | */ | ||
945 | struct GNUNET_CONTAINER_MultiPeerMapIterator * | 827 | struct GNUNET_CONTAINER_MultiPeerMapIterator * |
946 | GNUNET_CONTAINER_multipeermap_iterator_create ( | 828 | GNUNET_CONTAINER_multipeermap_iterator_create ( |
947 | const struct GNUNET_CONTAINER_MultiPeerMap *map) | 829 | const struct GNUNET_CONTAINER_MultiPeerMap *map) |
@@ -956,20 +838,6 @@ GNUNET_CONTAINER_multipeermap_iterator_create ( | |||
956 | } | 838 | } |
957 | 839 | ||
958 | 840 | ||
959 | /** | ||
960 | * Retrieve the next element from the hash map at the iterator's position. | ||
961 | * If there are no elements left, GNUNET_NO is returned, and 'key' and 'value' | ||
962 | * are not modified. | ||
963 | * This operation is only allowed if no elements have been removed from the | ||
964 | * multipeermap since the creation of 'iter', and the map has not been destroyed. | ||
965 | * Adding elements may result in repeating or skipping elements. | ||
966 | * | ||
967 | * @param iter the iterator to get the next element from | ||
968 | * @param key pointer to store the key in, can be NULL | ||
969 | * @param value pointer to store the value in, can be NULL | ||
970 | * @return #GNUNET_YES we returned an element, | ||
971 | * #GNUNET_NO if we are out of elements | ||
972 | */ | ||
973 | int | 841 | int |
974 | GNUNET_CONTAINER_multipeermap_iterator_next ( | 842 | GNUNET_CONTAINER_multipeermap_iterator_next ( |
975 | struct GNUNET_CONTAINER_MultiPeerMapIterator *iter, | 843 | struct GNUNET_CONTAINER_MultiPeerMapIterator *iter, |
@@ -1015,11 +883,6 @@ GNUNET_CONTAINER_multipeermap_iterator_next ( | |||
1015 | } | 883 | } |
1016 | 884 | ||
1017 | 885 | ||
1018 | /** | ||
1019 | * Destroy a multipeermap iterator. | ||
1020 | * | ||
1021 | * @param iter the iterator to destroy | ||
1022 | */ | ||
1023 | void | 886 | void |
1024 | GNUNET_CONTAINER_multipeermap_iterator_destroy ( | 887 | GNUNET_CONTAINER_multipeermap_iterator_destroy ( |
1025 | struct GNUNET_CONTAINER_MultiPeerMapIterator *iter) | 888 | struct GNUNET_CONTAINER_MultiPeerMapIterator *iter) |
diff --git a/src/util/container_multishortmap.c b/src/util/container_multishortmap.c index 77e5ca139..a02d55770 100644 --- a/src/util/container_multishortmap.c +++ b/src/util/container_multishortmap.c | |||
@@ -209,12 +209,6 @@ GNUNET_CONTAINER_multishortmap_create (unsigned int len, int do_not_copy_keys) | |||
209 | } | 209 | } |
210 | 210 | ||
211 | 211 | ||
212 | /** | ||
213 | * Destroy a hash map. Will not free any values | ||
214 | * stored in the hash map! | ||
215 | * | ||
216 | * @param map the map | ||
217 | */ | ||
218 | void | 212 | void |
219 | GNUNET_CONTAINER_multishortmap_destroy ( | 213 | GNUNET_CONTAINER_multishortmap_destroy ( |
220 | struct GNUNET_CONTAINER_MultiShortmap *map) | 214 | struct GNUNET_CONTAINER_MultiShortmap *map) |
@@ -276,12 +270,6 @@ idx_of (const struct GNUNET_CONTAINER_MultiShortmap *map, | |||
276 | } | 270 | } |
277 | 271 | ||
278 | 272 | ||
279 | /** | ||
280 | * Get the number of key-value pairs in the map. | ||
281 | * | ||
282 | * @param map the map | ||
283 | * @return the number of key value pairs | ||
284 | */ | ||
285 | unsigned int | 273 | unsigned int |
286 | GNUNET_CONTAINER_multishortmap_size ( | 274 | GNUNET_CONTAINER_multishortmap_size ( |
287 | const struct GNUNET_CONTAINER_MultiShortmap *map) | 275 | const struct GNUNET_CONTAINER_MultiShortmap *map) |
@@ -290,16 +278,6 @@ GNUNET_CONTAINER_multishortmap_size ( | |||
290 | } | 278 | } |
291 | 279 | ||
292 | 280 | ||
293 | /** | ||
294 | * Given a key find a value in the map matching the key. | ||
295 | * | ||
296 | * @param map the map | ||
297 | * @param key what to look for | ||
298 | * @return NULL if no value was found; note that | ||
299 | * this is indistinguishable from values that just | ||
300 | * happen to be NULL; use "contains" to test for | ||
301 | * key-value pairs with value NULL | ||
302 | */ | ||
303 | void * | 281 | void * |
304 | GNUNET_CONTAINER_multishortmap_get ( | 282 | GNUNET_CONTAINER_multishortmap_get ( |
305 | const struct GNUNET_CONTAINER_MultiShortmap *map, | 283 | const struct GNUNET_CONTAINER_MultiShortmap *map, |
@@ -324,15 +302,6 @@ GNUNET_CONTAINER_multishortmap_get ( | |||
324 | } | 302 | } |
325 | 303 | ||
326 | 304 | ||
327 | /** | ||
328 | * Iterate over all entries in the map. | ||
329 | * | ||
330 | * @param map the map | ||
331 | * @param it function to call on each entry | ||
332 | * @param it_cls extra argument to @a it | ||
333 | * @return the number of key value pairs processed, | ||
334 | * #GNUNET_SYSERR if it aborted iteration | ||
335 | */ | ||
336 | int | 305 | int |
337 | GNUNET_CONTAINER_multishortmap_iterate ( | 306 | GNUNET_CONTAINER_multishortmap_iterate ( |
338 | struct GNUNET_CONTAINER_MultiShortmap *map, | 307 | struct GNUNET_CONTAINER_MultiShortmap *map, |
@@ -427,17 +396,6 @@ update_next_cache_sme (struct GNUNET_CONTAINER_MultiShortmap *map, | |||
427 | } | 396 | } |
428 | 397 | ||
429 | 398 | ||
430 | /** | ||
431 | * Remove the given key-value pair from the map. Note that if the | ||
432 | * key-value pair is in the map multiple times, only one of the pairs | ||
433 | * will be removed. | ||
434 | * | ||
435 | * @param map the map | ||
436 | * @param key key of the key-value pair | ||
437 | * @param value value of the key-value pair | ||
438 | * @return #GNUNET_YES on success, #GNUNET_NO if the key-value pair | ||
439 | * is not in the map | ||
440 | */ | ||
441 | int | 399 | int |
442 | GNUNET_CONTAINER_multishortmap_remove ( | 400 | GNUNET_CONTAINER_multishortmap_remove ( |
443 | struct GNUNET_CONTAINER_MultiShortmap *map, | 401 | struct GNUNET_CONTAINER_MultiShortmap *map, |
@@ -494,14 +452,6 @@ GNUNET_CONTAINER_multishortmap_remove ( | |||
494 | } | 452 | } |
495 | 453 | ||
496 | 454 | ||
497 | /** | ||
498 | * Remove all entries for the given key from the map. | ||
499 | * Note that the values would not be "freed". | ||
500 | * | ||
501 | * @param map the map | ||
502 | * @param key identifies values to be removed | ||
503 | * @return number of values removed | ||
504 | */ | ||
505 | int | 455 | int |
506 | GNUNET_CONTAINER_multishortmap_remove_all ( | 456 | GNUNET_CONTAINER_multishortmap_remove_all ( |
507 | struct GNUNET_CONTAINER_MultiShortmap *map, | 457 | struct GNUNET_CONTAINER_MultiShortmap *map, |
@@ -582,15 +532,6 @@ GNUNET_CONTAINER_multishortmap_remove_all ( | |||
582 | } | 532 | } |
583 | 533 | ||
584 | 534 | ||
585 | /** | ||
586 | * Check if the map contains any value under the given | ||
587 | * key (including values that are NULL). | ||
588 | * | ||
589 | * @param map the map | ||
590 | * @param key the key to test if a value exists for it | ||
591 | * @return #GNUNET_YES if such a value exists, | ||
592 | * #GNUNET_NO if not | ||
593 | */ | ||
594 | int | 535 | int |
595 | GNUNET_CONTAINER_multishortmap_contains ( | 536 | GNUNET_CONTAINER_multishortmap_contains ( |
596 | const struct GNUNET_CONTAINER_MultiShortmap *map, | 537 | const struct GNUNET_CONTAINER_MultiShortmap *map, |
@@ -615,16 +556,6 @@ GNUNET_CONTAINER_multishortmap_contains ( | |||
615 | } | 556 | } |
616 | 557 | ||
617 | 558 | ||
618 | /** | ||
619 | * Check if the map contains the given value under the given | ||
620 | * key. | ||
621 | * | ||
622 | * @param map the map | ||
623 | * @param key the key to test if a value exists for it | ||
624 | * @param value value to test for | ||
625 | * @return #GNUNET_YES if such a value exists, | ||
626 | * #GNUNET_NO if not | ||
627 | */ | ||
628 | int | 559 | int |
629 | GNUNET_CONTAINER_multishortmap_contains_value ( | 560 | GNUNET_CONTAINER_multishortmap_contains_value ( |
630 | const struct GNUNET_CONTAINER_MultiShortmap *map, | 561 | const struct GNUNET_CONTAINER_MultiShortmap *map, |
@@ -708,18 +639,6 @@ grow (struct GNUNET_CONTAINER_MultiShortmap *map) | |||
708 | } | 639 | } |
709 | 640 | ||
710 | 641 | ||
711 | /** | ||
712 | * Store a key-value pair in the map. | ||
713 | * | ||
714 | * @param map the map | ||
715 | * @param key key to use | ||
716 | * @param value value to use | ||
717 | * @param opt options for put | ||
718 | * @return #GNUNET_OK on success, | ||
719 | * #GNUNET_NO if a value was replaced (with REPLACE) | ||
720 | * #GNUNET_SYSERR if #GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY was the option and the | ||
721 | * value already exists | ||
722 | */ | ||
723 | int | 642 | int |
724 | GNUNET_CONTAINER_multishortmap_put ( | 643 | GNUNET_CONTAINER_multishortmap_put ( |
725 | struct GNUNET_CONTAINER_MultiShortmap *map, | 644 | struct GNUNET_CONTAINER_MultiShortmap *map, |
@@ -914,18 +833,6 @@ GNUNET_CONTAINER_multishortmap_get_random ( | |||
914 | } | 833 | } |
915 | 834 | ||
916 | 835 | ||
917 | /** | ||
918 | * Create an iterator for a multishortmap. | ||
919 | * The iterator can be used to retrieve all the elements in the multishortmap | ||
920 | * one by one, without having to handle all elements at once (in contrast to | ||
921 | * #GNUNET_CONTAINER_multishortmap_iterate). Note that the iterator can not be | ||
922 | * used anymore if elements have been removed from 'map' after the creation of | ||
923 | * the iterator, or 'map' has been destroyed. Adding elements to 'map' may | ||
924 | * result in skipped or repeated elements. | ||
925 | * | ||
926 | * @param map the map to create an iterator for | ||
927 | * @return an iterator over the given multishortmap 'map' | ||
928 | */ | ||
929 | struct GNUNET_CONTAINER_MultiShortmapIterator * | 836 | struct GNUNET_CONTAINER_MultiShortmapIterator * |
930 | GNUNET_CONTAINER_multishortmap_iterator_create ( | 837 | GNUNET_CONTAINER_multishortmap_iterator_create ( |
931 | const struct GNUNET_CONTAINER_MultiShortmap *map) | 838 | const struct GNUNET_CONTAINER_MultiShortmap *map) |
@@ -940,20 +847,6 @@ GNUNET_CONTAINER_multishortmap_iterator_create ( | |||
940 | } | 847 | } |
941 | 848 | ||
942 | 849 | ||
943 | /** | ||
944 | * Retrieve the next element from the hash map at the iterator's position. | ||
945 | * If there are no elements left, GNUNET_NO is returned, and 'key' and 'value' | ||
946 | * are not modified. | ||
947 | * This operation is only allowed if no elements have been removed from the | ||
948 | * multishortmap since the creation of 'iter', and the map has not been destroyed. | ||
949 | * Adding elements may result in repeating or skipping elements. | ||
950 | * | ||
951 | * @param iter the iterator to get the next element from | ||
952 | * @param key pointer to store the key in, can be NULL | ||
953 | * @param value pointer to store the value in, can be NULL | ||
954 | * @return #GNUNET_YES we returned an element, | ||
955 | * #GNUNET_NO if we are out of elements | ||
956 | */ | ||
957 | int | 850 | int |
958 | GNUNET_CONTAINER_multishortmap_iterator_next ( | 851 | GNUNET_CONTAINER_multishortmap_iterator_next ( |
959 | struct GNUNET_CONTAINER_MultiShortmapIterator *iter, | 852 | struct GNUNET_CONTAINER_MultiShortmapIterator *iter, |
@@ -999,11 +892,6 @@ GNUNET_CONTAINER_multishortmap_iterator_next ( | |||
999 | } | 892 | } |
1000 | 893 | ||
1001 | 894 | ||
1002 | /** | ||
1003 | * Destroy a multishortmap iterator. | ||
1004 | * | ||
1005 | * @param iter the iterator to destroy | ||
1006 | */ | ||
1007 | void | 895 | void |
1008 | GNUNET_CONTAINER_multishortmap_iterator_destroy ( | 896 | GNUNET_CONTAINER_multishortmap_iterator_destroy ( |
1009 | struct GNUNET_CONTAINER_MultiShortmapIterator *iter) | 897 | struct GNUNET_CONTAINER_MultiShortmapIterator *iter) |
diff --git a/src/util/container_multiuuidmap.c b/src/util/container_multiuuidmap.c index f2ed304b3..fbc4c8c39 100644 --- a/src/util/container_multiuuidmap.c +++ b/src/util/container_multiuuidmap.c | |||
@@ -209,12 +209,6 @@ GNUNET_CONTAINER_multiuuidmap_create (unsigned int len, int do_not_copy_keys) | |||
209 | } | 209 | } |
210 | 210 | ||
211 | 211 | ||
212 | /** | ||
213 | * Destroy a hash map. Will not free any values | ||
214 | * stored in the hash map! | ||
215 | * | ||
216 | * @param map the map | ||
217 | */ | ||
218 | void | 212 | void |
219 | GNUNET_CONTAINER_multiuuidmap_destroy ( | 213 | GNUNET_CONTAINER_multiuuidmap_destroy ( |
220 | struct GNUNET_CONTAINER_MultiUuidmap *map) | 214 | struct GNUNET_CONTAINER_MultiUuidmap *map) |
@@ -276,12 +270,6 @@ idx_of (const struct GNUNET_CONTAINER_MultiUuidmap *map, | |||
276 | } | 270 | } |
277 | 271 | ||
278 | 272 | ||
279 | /** | ||
280 | * Get the number of key-value pairs in the map. | ||
281 | * | ||
282 | * @param map the map | ||
283 | * @return the number of key value pairs | ||
284 | */ | ||
285 | unsigned int | 273 | unsigned int |
286 | GNUNET_CONTAINER_multiuuidmap_size ( | 274 | GNUNET_CONTAINER_multiuuidmap_size ( |
287 | const struct GNUNET_CONTAINER_MultiUuidmap *map) | 275 | const struct GNUNET_CONTAINER_MultiUuidmap *map) |
@@ -290,16 +278,6 @@ GNUNET_CONTAINER_multiuuidmap_size ( | |||
290 | } | 278 | } |
291 | 279 | ||
292 | 280 | ||
293 | /** | ||
294 | * Given a key find a value in the map matching the key. | ||
295 | * | ||
296 | * @param map the map | ||
297 | * @param key what to look for | ||
298 | * @return NULL if no value was found; note that | ||
299 | * this is indistinguishable from values that just | ||
300 | * happen to be NULL; use "contains" to test for | ||
301 | * key-value pairs with value NULL | ||
302 | */ | ||
303 | void * | 281 | void * |
304 | GNUNET_CONTAINER_multiuuidmap_get ( | 282 | GNUNET_CONTAINER_multiuuidmap_get ( |
305 | const struct GNUNET_CONTAINER_MultiUuidmap *map, | 283 | const struct GNUNET_CONTAINER_MultiUuidmap *map, |
@@ -324,15 +302,6 @@ GNUNET_CONTAINER_multiuuidmap_get ( | |||
324 | } | 302 | } |
325 | 303 | ||
326 | 304 | ||
327 | /** | ||
328 | * Iterate over all entries in the map. | ||
329 | * | ||
330 | * @param map the map | ||
331 | * @param it function to call on each entry | ||
332 | * @param it_cls extra argument to @a it | ||
333 | * @return the number of key value pairs processed, | ||
334 | * #GNUNET_SYSERR if it aborted iteration | ||
335 | */ | ||
336 | int | 305 | int |
337 | GNUNET_CONTAINER_multiuuidmap_iterate ( | 306 | GNUNET_CONTAINER_multiuuidmap_iterate ( |
338 | struct GNUNET_CONTAINER_MultiUuidmap *map, | 307 | struct GNUNET_CONTAINER_MultiUuidmap *map, |
@@ -427,17 +396,6 @@ update_next_cache_sme (struct GNUNET_CONTAINER_MultiUuidmap *map, | |||
427 | } | 396 | } |
428 | 397 | ||
429 | 398 | ||
430 | /** | ||
431 | * Remove the given key-value pair from the map. Note that if the | ||
432 | * key-value pair is in the map multiple times, only one of the pairs | ||
433 | * will be removed. | ||
434 | * | ||
435 | * @param map the map | ||
436 | * @param key key of the key-value pair | ||
437 | * @param value value of the key-value pair | ||
438 | * @return #GNUNET_YES on success, #GNUNET_NO if the key-value pair | ||
439 | * is not in the map | ||
440 | */ | ||
441 | int | 399 | int |
442 | GNUNET_CONTAINER_multiuuidmap_remove (struct GNUNET_CONTAINER_MultiUuidmap *map, | 400 | GNUNET_CONTAINER_multiuuidmap_remove (struct GNUNET_CONTAINER_MultiUuidmap *map, |
443 | const struct GNUNET_Uuid *key, | 401 | const struct GNUNET_Uuid *key, |
@@ -493,14 +451,6 @@ GNUNET_CONTAINER_multiuuidmap_remove (struct GNUNET_CONTAINER_MultiUuidmap *map, | |||
493 | } | 451 | } |
494 | 452 | ||
495 | 453 | ||
496 | /** | ||
497 | * Remove all entries for the given key from the map. | ||
498 | * Note that the values would not be "freed". | ||
499 | * | ||
500 | * @param map the map | ||
501 | * @param key identifies values to be removed | ||
502 | * @return number of values removed | ||
503 | */ | ||
504 | int | 454 | int |
505 | GNUNET_CONTAINER_multiuuidmap_remove_all ( | 455 | GNUNET_CONTAINER_multiuuidmap_remove_all ( |
506 | struct GNUNET_CONTAINER_MultiUuidmap *map, | 456 | struct GNUNET_CONTAINER_MultiUuidmap *map, |
@@ -581,15 +531,6 @@ GNUNET_CONTAINER_multiuuidmap_remove_all ( | |||
581 | } | 531 | } |
582 | 532 | ||
583 | 533 | ||
584 | /** | ||
585 | * Check if the map contains any value under the given | ||
586 | * key (including values that are NULL). | ||
587 | * | ||
588 | * @param map the map | ||
589 | * @param key the key to test if a value exists for it | ||
590 | * @return #GNUNET_YES if such a value exists, | ||
591 | * #GNUNET_NO if not | ||
592 | */ | ||
593 | int | 534 | int |
594 | GNUNET_CONTAINER_multiuuidmap_contains ( | 535 | GNUNET_CONTAINER_multiuuidmap_contains ( |
595 | const struct GNUNET_CONTAINER_MultiUuidmap *map, | 536 | const struct GNUNET_CONTAINER_MultiUuidmap *map, |
@@ -614,16 +555,6 @@ GNUNET_CONTAINER_multiuuidmap_contains ( | |||
614 | } | 555 | } |
615 | 556 | ||
616 | 557 | ||
617 | /** | ||
618 | * Check if the map contains the given value under the given | ||
619 | * key. | ||
620 | * | ||
621 | * @param map the map | ||
622 | * @param key the key to test if a value exists for it | ||
623 | * @param value value to test for | ||
624 | * @return #GNUNET_YES if such a value exists, | ||
625 | * #GNUNET_NO if not | ||
626 | */ | ||
627 | int | 558 | int |
628 | GNUNET_CONTAINER_multiuuidmap_contains_value ( | 559 | GNUNET_CONTAINER_multiuuidmap_contains_value ( |
629 | const struct GNUNET_CONTAINER_MultiUuidmap *map, | 560 | const struct GNUNET_CONTAINER_MultiUuidmap *map, |
@@ -707,18 +638,6 @@ grow (struct GNUNET_CONTAINER_MultiUuidmap *map) | |||
707 | } | 638 | } |
708 | 639 | ||
709 | 640 | ||
710 | /** | ||
711 | * Store a key-value pair in the map. | ||
712 | * | ||
713 | * @param map the map | ||
714 | * @param key key to use | ||
715 | * @param value value to use | ||
716 | * @param opt options for put | ||
717 | * @return #GNUNET_OK on success, | ||
718 | * #GNUNET_NO if a value was replaced (with REPLACE) | ||
719 | * #GNUNET_SYSERR if #GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY was the option and the | ||
720 | * value already exists | ||
721 | */ | ||
722 | int | 641 | int |
723 | GNUNET_CONTAINER_multiuuidmap_put (struct GNUNET_CONTAINER_MultiUuidmap *map, | 642 | GNUNET_CONTAINER_multiuuidmap_put (struct GNUNET_CONTAINER_MultiUuidmap *map, |
724 | const struct GNUNET_Uuid *key, | 643 | const struct GNUNET_Uuid *key, |
@@ -912,18 +831,6 @@ GNUNET_CONTAINER_multiuuidmap_get_random ( | |||
912 | } | 831 | } |
913 | 832 | ||
914 | 833 | ||
915 | /** | ||
916 | * Create an iterator for a multiuuidmap. | ||
917 | * The iterator can be used to retrieve all the elements in the multiuuidmap | ||
918 | * one by one, without having to handle all elements at once (in contrast to | ||
919 | * #GNUNET_CONTAINER_multiuuidmap_iterate). Note that the iterator can not be | ||
920 | * used anymore if elements have been removed from 'map' after the creation of | ||
921 | * the iterator, or 'map' has been destroyed. Adding elements to 'map' may | ||
922 | * result in skipped or repeated elements. | ||
923 | * | ||
924 | * @param map the map to create an iterator for | ||
925 | * @return an iterator over the given multiuuidmap 'map' | ||
926 | */ | ||
927 | struct GNUNET_CONTAINER_MultiUuidmapIterator * | 834 | struct GNUNET_CONTAINER_MultiUuidmapIterator * |
928 | GNUNET_CONTAINER_multiuuidmap_iterator_create ( | 835 | GNUNET_CONTAINER_multiuuidmap_iterator_create ( |
929 | const struct GNUNET_CONTAINER_MultiUuidmap *map) | 836 | const struct GNUNET_CONTAINER_MultiUuidmap *map) |
@@ -938,20 +845,6 @@ GNUNET_CONTAINER_multiuuidmap_iterator_create ( | |||
938 | } | 845 | } |
939 | 846 | ||
940 | 847 | ||
941 | /** | ||
942 | * Retrieve the next element from the hash map at the iterator's position. | ||
943 | * If there are no elements left, GNUNET_NO is returned, and 'key' and 'value' | ||
944 | * are not modified. | ||
945 | * This operation is only allowed if no elements have been removed from the | ||
946 | * multiuuidmap since the creation of 'iter', and the map has not been destroyed. | ||
947 | * Adding elements may result in repeating or skipping elements. | ||
948 | * | ||
949 | * @param iter the iterator to get the next element from | ||
950 | * @param key pointer to store the key in, can be NULL | ||
951 | * @param value pointer to store the value in, can be NULL | ||
952 | * @return #GNUNET_YES we returned an element, | ||
953 | * #GNUNET_NO if we are out of elements | ||
954 | */ | ||
955 | int | 848 | int |
956 | GNUNET_CONTAINER_multiuuidmap_iterator_next ( | 849 | GNUNET_CONTAINER_multiuuidmap_iterator_next ( |
957 | struct GNUNET_CONTAINER_MultiUuidmapIterator *iter, | 850 | struct GNUNET_CONTAINER_MultiUuidmapIterator *iter, |
@@ -997,11 +890,6 @@ GNUNET_CONTAINER_multiuuidmap_iterator_next ( | |||
997 | } | 890 | } |
998 | 891 | ||
999 | 892 | ||
1000 | /** | ||
1001 | * Destroy a multiuuidmap iterator. | ||
1002 | * | ||
1003 | * @param iter the iterator to destroy | ||
1004 | */ | ||
1005 | void | 893 | void |
1006 | GNUNET_CONTAINER_multiuuidmap_iterator_destroy ( | 894 | GNUNET_CONTAINER_multiuuidmap_iterator_destroy ( |
1007 | struct GNUNET_CONTAINER_MultiUuidmapIterator *iter) | 895 | struct GNUNET_CONTAINER_MultiUuidmapIterator *iter) |