mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-27 07:56:14 +01:00
Add a note to the g_str_hash docs
Point out some shortcomings of the djb hash, as found in https://bugzilla.gnome.org/show_bug.cgi?id=751610
This commit is contained in:
parent
a80e7db1a8
commit
17871e6881
@ -1860,6 +1860,10 @@ g_str_equal (gconstpointer v1,
|
|||||||
* It can be passed to g_hash_table_new() as the @hash_func parameter,
|
* It can be passed to g_hash_table_new() as the @hash_func parameter,
|
||||||
* when using non-%NULL strings as keys in a #GHashTable.
|
* when using non-%NULL strings as keys in a #GHashTable.
|
||||||
*
|
*
|
||||||
|
* Note that this function may not be a perfect fit for all use cases.
|
||||||
|
* For example, it produces some hash collisions with strings as short
|
||||||
|
* as 2.
|
||||||
|
*
|
||||||
* Returns: a hash value corresponding to the key
|
* Returns: a hash value corresponding to the key
|
||||||
*/
|
*/
|
||||||
guint
|
guint
|
||||||
|
Loading…
Reference in New Issue
Block a user