Mercurial > pidgin.yaz
changeset 32174:94e1e3ed0bb0
conversation: Use the right comparison type (case-sensitive) for the hash table
Okay, the various types of comparisons done on in-room nicks are annoying.
Seriously, half the code seems to use g_utf8_collate, and the other half
use purple_utf8_strcasecmp.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Wed, 22 Jun 2011 02:35:45 +0000 |
parents | dc69d22279e5 |
children | 910e966d18b3 |
files | libpurple/conversation.c |
diffstat | 1 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/conversation.c Tue Jun 21 05:45:24 2011 +0000 +++ b/libpurple/conversation.c Wed Jun 22 02:35:45 2011 +0000 @@ -73,20 +73,18 @@ static guint _purple_conversation_user_hash(gconstpointer data) { const gchar *name = data; - gchar *casefold, *collated; + gchar *collated; guint hash; - casefold = g_utf8_casefold(name, -1); - collated = g_utf8_collate_key(casefold, -1); + collated = g_utf8_collate_key(name, -1); hash = g_str_hash(collated); g_free(collated); - g_free(casefold); return hash; } static gboolean _purple_conversation_user_equal(gconstpointer a, gconstpointer b) { - return !purple_utf8_strcasecmp(a, b); + return !g_utf8_collate(a, b); } void