X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fhash-pjw.c;h=0a14b3e7af9b1f28008b253b3a44827fbf38fa77;hb=46e647a11e9d46474f478faade784c8fee57d148;hp=141b08b51f727c072e1fdb141ed355d02d959533;hpb=7aabcfc8f8c6964a2ca12c6c6765eb48fe24575c;p=gnulib.git diff --git a/lib/hash-pjw.c b/lib/hash-pjw.c index 141b08b51..0a14b3e7a 100644 --- a/lib/hash-pjw.c +++ b/lib/hash-pjw.c @@ -1,5 +1,5 @@ /* hash-pjw.c -- compute a hash value from a NUL-terminated string. - Copyright 2001 Free Software Foundation, Inc. + Copyright 2001, 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,7 +22,10 @@ #include "hash-pjw.h" /* A hash function for NUL-terminated char* strings using - the method described in Aho, Sethi, & Ullman, p 436. */ + the method described in Aho, Sethi, & Ullman, p 436. + Note that this hash function produces a lot of collisions when used + with short strings with very varied bit patterns. + See http://www.haible.de/bruno/hashfunc.html. */ unsigned int hash_pjw (const void *x, unsigned int tablesize)