| 63 | } |
| 64 | |
| 65 | static 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 | |
| 82 | static void pni_map_allocate(pn_map_t *map) |
| 83 | { |
nothing calls this directly
no test coverage detected