MCPcopy Create free account
hub / github.com/apache/qpid-proton / pn_map_hashcode

Function pn_map_hashcode

c/src/core/object/map.c:65–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65static uintptr_t pn_map_hashcode(void *object)
66{
67 pn_map_t *map = (pn_map_t *) object;
68
69 uintptr_t hashcode = 0;
70
71 for (size_t i = 0; i < map->capacity; i++) {
72 if (map->entries[i].state != PNI_ENTRY_FREE) {
73 void *key = map->entries[i].key;
74 void *value = map->entries[i].value;
75 hashcode += pn_hashcode(key) ^ pn_hashcode(value);
76 }
77 }
78
79 return hashcode;
80}
81
82static void pni_map_allocate(pn_map_t *map)
83{

Callers

nothing calls this directly

Calls 1

pn_hashcodeFunction · 0.85

Tested by

no test coverage detected