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/container_multihashmap32.c | |
parent | 08a0ef9dff9d401bfaae332a076716c49f85d7ca (diff) | |
download | gnunet-8c6a68c258061f68466905393b76106436d3dccf.tar.gz gnunet-8c6a68c258061f68466905393b76106436d3dccf.zip |
-DOC first pass through UTIL container library
Diffstat (limited to 'src/util/container_multihashmap32.c')
-rw-r--r-- | src/util/container_multihashmap32.c | 73 |
1 files changed, 0 insertions, 73 deletions
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, |