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

Function pn_list_hashcode

c/src/core/object/list.c:205–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205static uintptr_t pn_list_hashcode(void *object)
206{
207 assert(object);
208 pn_list_t *list = (pn_list_t *) object;
209 uintptr_t hash = 1;
210
211 for (size_t i = 0; i < list->size; i++) {
212 hash = hash * 31 + pn_hashcode(pn_list_get(list, i));
213 }
214
215 return hash;
216}
217
218static intptr_t pn_list_compare(void *oa, void *ob)
219{

Callers

nothing calls this directly

Calls 2

pn_hashcodeFunction · 0.85
pn_list_getFunction · 0.85

Tested by

no test coverage detected