diff libpurple/blist.c @ 27592:c868575ded5d

Better hash function for the PurpleBuddy lookup hashtables.
author Paul Aurich <paul@darkrain42.org>
date Thu, 16 Jul 2009 20:22:05 +0000
parents b84f51988365
children b419196556c7
line wrap: on
line diff
--- a/libpurple/blist.c	Thu Jul 16 20:06:27 2009 +0000
+++ b/libpurple/blist.c	Thu Jul 16 20:22:05 2009 +0000
@@ -92,7 +92,7 @@
 /* This function must not use purple_normalize */
 static guint _purple_blist_hbuddy_hash(struct _purple_hbuddy *hb)
 {
-	return g_str_hash(hb->name);
+	return g_str_hash(hb->name) ^ g_direct_hash(hb->group) ^ g_direct_hash(hb->account);
 }
 
 /* This function must not use purple_normalize */