mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-03 08:58:17 +03:00
applied patch from Sander Vesik improving the quality of the hash
* hash.c: applied patch from Sander Vesik improving the quality of the hash function. Daniel
This commit is contained in:
parent
21473679f7
commit
5f7f991ab7
@ -1,3 +1,8 @@
|
||||
Mon Jun 17 19:02:49 CEST 2002 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* hash.c: applied patch from Sander Vesik improving the quality of
|
||||
the hash function.
|
||||
|
||||
2002-06-14 Aleksey Sanin <aleksey@aleksey.com>
|
||||
|
||||
* DOCBparser.c HTMLparser.c debugXML.c encoding.c
|
||||
|
9
hash.c
9
hash.c
@ -66,20 +66,17 @@ xmlHashComputeKey(xmlHashTablePtr table, const xmlChar *name,
|
||||
if (name != NULL) {
|
||||
value += 30 * (*name);
|
||||
while ((ch = *name++) != 0) {
|
||||
/* value *= 31; */
|
||||
value += (unsigned long)ch;
|
||||
value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch);
|
||||
}
|
||||
}
|
||||
if (name2 != NULL) {
|
||||
while ((ch = *name2++) != 0) {
|
||||
/* value *= 31; */
|
||||
value += (unsigned long)ch;
|
||||
value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch);
|
||||
}
|
||||
}
|
||||
if (name3 != NULL) {
|
||||
while ((ch = *name3++) != 0) {
|
||||
/* value *= 31; */
|
||||
value += (unsigned long)ch;
|
||||
value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch);
|
||||
}
|
||||
}
|
||||
return (value % table->size);
|
||||
|
@ -266,6 +266,8 @@ struct _xmlSchema {
|
||||
xmlHashTablePtr notaDecl;
|
||||
|
||||
xmlHashTablePtr schemasImports;
|
||||
|
||||
void *_private; /* unused by the library for users or bindings */
|
||||
};
|
||||
|
||||
void xmlSchemaFreeType (xmlSchemaTypePtr type);
|
||||
|
Loading…
x
Reference in New Issue
Block a user