gobjectification: b050f55f: Fixed some casting, more to go

aluink at soc.pidgin.im aluink at soc.pidgin.im
Sun Jul 19 14:35:22 EDT 2009


-----------------------------------------------------------------
Revision: b050f55f12979fecbeff391c0538e7826a62ec0a
Ancestor: d4594f5e09c6881285561af9d7798f33e4b48dab
Author: aluink at soc.pidgin.im
Date: 2009-07-19T18:31:23
Branch: im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/b050f55f12979fecbeff391c0538e7826a62ec0a

Modified files:
        libpurple/blist.c libpurple/contact.c

ChangeLog: 

Fixed some casting, more to go

-------------- next part --------------
============================================================
--- libpurple/blist.c	d2d5e60a4531bed1cc0cc93bddd1b35cea50c065
+++ libpurple/blist.c	3bf3a7bb307515ea5428ec3ce59d2db4d03f7f43
@@ -468,9 +468,9 @@ void purple_blist_rename_group(PurpleGro
 			next = child->next;
 			if (PURPLE_IS_CONTACT(child)) {
 				PurpleBlistNode *bnode;
-				purple_blist_add_contact((PurpleContact *)child, dest, prev);
+				purple_blist_add_contact(PURPLE_CONTACT(child), dest, prev);
 				for (bnode = child->child; bnode != NULL; bnode = bnode->next) {
-					purple_blist_add_buddy((PurpleBuddy *)bnode, (PurpleContact *)child,
+					purple_blist_add_buddy((PurpleBuddy *)bnode, PURPLE_CONTACT(child),
 							NULL, bnode->prev);
 					moved_buddies = g_list_append(moved_buddies, bnode);
 				}
@@ -1037,15 +1037,15 @@ void purple_blist_add_account(PurpleAcco
 						if (PURPLE_IS_BUDDY(bnode) &&
 								purple_buddy_get_account(PURPLE_BUDDY(bnode)) == account) {
 							recompute = TRUE;
-							((PurpleContact*)cnode)->currentsize++;
-							if (((PurpleContact*)cnode)->currentsize == 1)
+							(PURPLE_CONTACT(cnode))->currentsize++;
+							if ((PURPLE_CONTACT(cnode))->currentsize == 1)
 								(PURPLE_GROUP(gnode))->currentsize++;
 							ops->update(bnode);
 						}
 					}
 					if (recompute ||
 							purple_blist_node_get_bool(cnode, "show_offline")) {
-						purple_contact_invalidate_priority_buddy((PurpleContact*)cnode);
+						purple_contact_invalidate_priority_buddy(PURPLE_CONTACT(cnode));
 						ops->update(cnode);
 					}
 			} else if (PURPLE_IS_CHAT(cnode) &&
@@ -1080,7 +1080,7 @@ void purple_blist_remove_account(PurpleA
 		for (cnode = gnode->child; cnode; cnode = cnode->next) {
 			if (PURPLE_IS_CONTACT(cnode)) {
 				gboolean recompute = FALSE;
-				contact = (PurpleContact *)cnode;
+				contact = PURPLE_CONTACT(cnode);
 
 				for (bnode = cnode->child; bnode; bnode = bnode->next) {
 					if (!PURPLE_IS_BUDDY(bnode))
@@ -1149,7 +1149,7 @@ gboolean purple_group_on_account(PurpleG
 	PurpleBlistNode *cnode;
 	for (cnode = (PURPLE_BLIST_NODE(g))->child; cnode; cnode = cnode->next) {
 		if (PURPLE_IS_CONTACT(cnode)) {
-			if(purple_contact_on_account((PurpleContact *) cnode, account))
+			if(purple_contact_on_account(PURPLE_CONTACT(cnode), account))
 				return TRUE;
 		} else if (PURPLE_IS_CHAT(cnode)) {
 			PurpleChat *chat = (PurpleChat *)cnode;
============================================================
--- libpurple/contact.c	abb2b7bcb4c3fc6e149ca3fe4c1cbb9d798ff16d
+++ libpurple/contact.c	6a6df4af0dde39ad643b0a2a3a84e224ec0bdaef
@@ -40,7 +40,7 @@ contact_to_xmlnode(PurpleBlistNode *cnod
 	PurpleContact *contact;
 	PurpleBlistNode *bnode;
 
-	contact = (PurpleContact *)cnode;
+	contact = PURPLE_CONTACT(cnode);
 
 	node = xmlnode_new("contact");
 


More information about the Commits mailing list