*/
#include "platform.h"
-#include "gnunet_common.h"
-#include "gnunet_container_lib.h"
-#include "gnunet_crypto_lib.h"
+#include "gnunet_util_lib.h"
#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
struct GNUNET_CONTAINER_MultiHashMap32 *ret;
GNUNET_assert (len > 0);
- ret = GNUNET_malloc (sizeof (struct GNUNET_CONTAINER_MultiHashMap32));
+ ret = GNUNET_new (struct GNUNET_CONTAINER_MultiHashMap32);
ret->map = GNUNET_malloc (len * sizeof (struct MapEntry *));
ret->map_length = len;
return ret;
int
GNUNET_CONTAINER_multihashmap32_contains_value (const struct
GNUNET_CONTAINER_MultiHashMap32
- *map,
+ *map,
uint32_t key,
const void *value)
{
grow (map);
i = idx_of (map, key);
}
- e = GNUNET_malloc (sizeof (struct MapEntry));
+ e = GNUNET_new (struct MapEntry);
e->key = key;
e->value = value;
e->next = map->map[i];
GNUNET_CONTAINER_multihashmap32_get_multiple (const struct
GNUNET_CONTAINER_MultiHashMap32
*map, uint32_t key,
- GNUNET_CONTAINER_HashMapIterator32
+ GNUNET_CONTAINER_HashMapIterator32
it, void *it_cls)
{
int count;