pidgin: ad151922: g_strcmp0 was added in glib 2.16.0, but ...
markdoliner at pidgin.im
markdoliner at pidgin.im
Tue Nov 9 20:05:49 EST 2010
----------------------------------------------------------------------
Revision: ad151922d1c3745be314ea937d77aa8bcab04379
Parent: 1794c0679af33373ae3713099d5880e0eea1adfd
Author: markdoliner at pidgin.im
Date: 11/09/10 20:00:42
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/ad151922d1c3745be314ea937d77aa8bcab04379
Changelog:
g_strcmp0 was added in glib 2.16.0, but we keep compatibility with 2.12.
Implement backward compatibility by basically implementing
g_strcmp0 within this function
Changes against parent 1794c0679af33373ae3713099d5880e0eea1adfd
patched libpurple/protocols/msn/user.c
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/user.c 1b68f8f9bed491429fcb234825c8d96691076bd6
+++ libpurple/protocols/msn/user.c aa6d00b9dbc31b5c446f4745677a6488939520fb
@@ -742,7 +742,18 @@ msn_user_passport_cmp(MsnUser *user, con
str = purple_normalize_nocase(NULL, msn_user_get_passport(user));
pass = g_strdup(str);
+#if GLIB_CHECK_VERSION(2,16,0)
result = g_strcmp0(pass, purple_normalize_nocase(NULL, passport));
+#else
+ str = purple_normalize_nocase(NULL, passport);
+ if (!pass)
+ result = -(pass != str);
+ else if (!str)
+ result = pass != str;
+ else
+ result = strcmp(pass, str);
+#endif /* GLIB < 2.16.0 */
+
g_free(pass);
return result;
More information about the Commits
mailing list