pidgin/ljfisher-ssl-client-auth

Parents f21c53266e55
Children 3ec8634fccec
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.
--- 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