pidgin.next.minor: 9681bcef: conversation: Use the right comparison t...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Tue Jun 21 22:50:49 EDT 2011


----------------------------------------------------------------------
Revision: 9681bcefcadc4b4fad248fd0ec922892aaefdd76
Parent:   99676b6c4987bf02b3048e218c8114a06eca2f8c
Author:   darkrain42 at pidgin.im
Date:     06/21/11 22:35:45
Branch:   im.pidgin.pidgin.next.minor
URL: http://d.pidgin.im/viewmtn/revision/info/9681bcefcadc4b4fad248fd0ec922892aaefdd76

Changelog: 

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.

Changes against parent 99676b6c4987bf02b3048e218c8114a06eca2f8c

  patched  libpurple/conversation.c

-------------- next part --------------
============================================================
--- libpurple/conversation.c	b8f44a891425929971c3e53be4bf9f07414af444
+++ libpurple/conversation.c	cd6817f4863abafef969359f65cc025f9483b401
@@ -73,20 +73,18 @@ static guint _purple_conversation_user_h
 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


More information about the Commits mailing list