[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r9209 - gnunet/src/util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r9209 - gnunet/src/util |
Date: |
Mon, 19 Oct 2009 16:00:03 -0600 |
Author: grothoff
Date: 2009-10-19 16:00:02 -0600 (Mon, 19 Oct 2009)
New Revision: 9209
Modified:
gnunet/src/util/container_multihashmap.c
Log:
fix
Modified: gnunet/src/util/container_multihashmap.c
===================================================================
--- gnunet/src/util/container_multihashmap.c 2009-10-19 21:58:41 UTC (rev
9208)
+++ gnunet/src/util/container_multihashmap.c 2009-10-19 22:00:02 UTC (rev
9209)
@@ -19,7 +19,7 @@
*/
/**
* @file util/container_multihashmap.c
- * @brief hash map where the same key maybe present multiple times
+ * @brief hash map where the same key may be present multiple times
* @author Christian Grothoff
*/
@@ -28,6 +28,9 @@
#include "gnunet_container_lib.h"
#include "gnunet_crypto_lib.h"
+/**
+ *
+ */
struct MapEntry
{
GNUNET_HashCode key;
@@ -35,6 +38,9 @@
struct MapEntry *next;
};
+/**
+ *
+ */
struct GNUNET_CONTAINER_MultiHashMap
{
@@ -45,6 +51,7 @@
unsigned int map_length;
};
+
struct GNUNET_CONTAINER_MultiHashMap *
GNUNET_CONTAINER_multihashmap_create (unsigned int len)
{
@@ -58,6 +65,7 @@
return ret;
}
+
void
GNUNET_CONTAINER_multihashmap_destroy (struct GNUNET_CONTAINER_MultiHashMap
*map)
@@ -84,6 +92,7 @@
return (*(unsigned int *) key) % m->map_length;
}
+
unsigned int
GNUNET_CONTAINER_multihashmap_size (const struct GNUNET_CONTAINER_MultiHashMap
*map)
@@ -91,6 +100,7 @@
return map->size;
}
+
void *
GNUNET_CONTAINER_multihashmap_get (const struct GNUNET_CONTAINER_MultiHashMap
*map, const GNUNET_HashCode * key)
@@ -107,6 +117,7 @@
return NULL;
}
+
int
GNUNET_CONTAINER_multihashmap_iterate (const struct
GNUNET_CONTAINER_MultiHashMap *map,
@@ -132,6 +143,7 @@
return count;
}
+
int
GNUNET_CONTAINER_multihashmap_remove (struct GNUNET_CONTAINER_MultiHashMap
*map, const GNUNET_HashCode * key,
@@ -163,6 +175,7 @@
return GNUNET_NO;
}
+
int
GNUNET_CONTAINER_multihashmap_remove_all (struct GNUNET_CONTAINER_MultiHashMap
*map, const GNUNET_HashCode * key)
@@ -201,6 +214,7 @@
return ret;
}
+
int
GNUNET_CONTAINER_multihashmap_contains (const struct
GNUNET_CONTAINER_MultiHashMap *map,
@@ -220,6 +234,7 @@
return GNUNET_NO;
}
+
static void
grow (struct GNUNET_CONTAINER_MultiHashMap *map)
{
@@ -245,6 +260,7 @@
GNUNET_free (old);
}
+
int
GNUNET_CONTAINER_multihashmap_put (struct GNUNET_CONTAINER_MultiHashMap *map,
const GNUNET_HashCode * key,
@@ -284,6 +300,7 @@
return GNUNET_OK;
}
+
int
GNUNET_CONTAINER_multihashmap_get_multiple (const struct
GNUNET_CONTAINER_MultiHashMap
@@ -309,6 +326,7 @@
return count;
}
+
void *
GNUNET_CONTAINER_multihashmap_get_random (const struct
GNUNET_CONTAINER_MultiHashMap *map)
@@ -331,4 +349,4 @@
return e->value;
}
-/* end of multihashmap.c */
+/* end of container_multihashmap.c */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r9209 - gnunet/src/util,
gnunet <=