MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlHashValue

Function xmlHashValue

ThirdParty/libxml2/vtklibxml2/hash.c:59–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57xmlHashGrow(xmlHashTablePtr hash, unsigned size);
58
59ATTRIBUTE_NO_SANITIZE_INTEGER
60static unsigned
61xmlHashValue(unsigned seed, const xmlChar *key, const xmlChar *key2,
62 const xmlChar *key3, size_t *lengths) {
63 unsigned h1, h2;
64 size_t i;
65
66 HASH_INIT(h1, h2, seed);
67
68 for (i = 0; key[i] != 0; i++) {
69 HASH_UPDATE(h1, h2, key[i]);
70 }
71 if (lengths)
72 lengths[0] = i;
73
74 HASH_UPDATE(h1, h2, 0);
75
76 if (key2 != NULL) {
77 for (i = 0; key2[i] != 0; i++) {
78 HASH_UPDATE(h1, h2, key2[i]);
79 }
80 if (lengths)
81 lengths[1] = i;
82 }
83
84 HASH_UPDATE(h1, h2, 0);
85
86 if (key3 != NULL) {
87 for (i = 0; key3[i] != 0; i++) {
88 HASH_UPDATE(h1, h2, key3[i]);
89 }
90 if (lengths)
91 lengths[2] = i;
92 }
93
94 HASH_FINISH(h1, h2);
95
96 return(h2);
97}
98
99ATTRIBUTE_NO_SANITIZE_INTEGER
100static unsigned

Callers 3

xmlHashUpdateInternalFunction · 0.85
xmlHashLookup3Function · 0.85
xmlHashRemoveEntry3Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected