soc.2010.msn-tlc: e4e280e8: Remove msn_user_destroy in favor of msn_...

masca at cpw.pidgin.im masca at cpw.pidgin.im
Fri May 28 18:26:08 EDT 2010


-----------------------------------------------------------------
Revision: e4e280e88242a85514761ed370d78a0126b124fe
Ancestor: 27a7cb54bf0445b92466fb27f237de5c8acdf3a1
Author: masca at cpw.pidgin.im
Date: 2010-05-27T22:14:53
Branch: im.pidgin.soc.2010.msn-tlc
URL: http://d.pidgin.im/viewmtn/revision/info/e4e280e88242a85514761ed370d78a0126b124fe

Modified files:
        libpurple/protocols/msn/msn.c
        libpurple/protocols/msn/session.c
        libpurple/protocols/msn/user.c
        libpurple/protocols/msn/user.h
        libpurple/protocols/msn/userlist.c

ChangeLog: 

Remove msn_user_destroy in favor of msn_user_unref.

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/msn.c	f8f6f1290254d1737713404b9951f9910987cc21
+++ libpurple/protocols/msn/msn.c	6fdfb4ba18b54aa48956b97270849951aff037d4
@@ -1700,7 +1700,7 @@ add_pending_buddy(MsnSession *session,
 		MsnUser *user2 = msn_userlist_find_user(userlist, who);
 		if (user2 != NULL) {
 			/* User already in userlist, so just update it. */
-			msn_user_destroy(user);
+			msn_user_unref(user);
 			user = user2;
 		} else {
 			msn_userlist_add_user(userlist, user);
@@ -1720,7 +1720,7 @@ add_pending_buddy(MsnSession *session,
 
 		/* Remove from local list */
 		purple_blist_remove_buddy(buddy);
-		msn_user_destroy(user);
+		msn_user_unref(user);
 	}
 	g_free(group);
 }
============================================================
--- libpurple/protocols/msn/session.c	ebf3c99349ef1edfd010a34ae786c2e98b56b28f
+++ libpurple/protocols/msn/session.c	d822a80f01e188823a57ae9233bc6a059909fd7c
@@ -81,7 +81,7 @@ msn_session_destroy(MsnSession *session)
 		msn_nexus_destroy(session->nexus);
 
 	if (session->user != NULL)
-		msn_user_destroy(session->user);
+		msn_user_unref(session->user);
 
 	if (session->notification != NULL)
 		msn_notification_destroy(session->notification);
============================================================
--- libpurple/protocols/msn/user.c	89335876fdb66a391f6020805857c53d2b89ed8b
+++ libpurple/protocols/msn/user.c	debd8b72139bca885422efed84284e1954207ce1
@@ -50,7 +50,7 @@ msn_user_new(MsnUserList *userlist, cons
 }
 
 /*destroy a user object*/
-void
+static void
 msn_user_destroy(MsnUser *user)
 {
 	g_return_if_fail(user != NULL);
============================================================
--- libpurple/protocols/msn/user.h	b6dbc8d2eaf6f97f683530b0b9f001a8a0ba7088
+++ libpurple/protocols/msn/user.h	17a1865ace22c7016f29403d76c37cdf62805a13
@@ -150,13 +150,6 @@ MsnUser *msn_user_new(MsnUserList *userl
 					  const char *friendly_name);
 
 /**
- * Destroys a user structure.
- *
- * @param user The user to destroy.
- */
-void msn_user_destroy(MsnUser *user);
-
-/**
  * Increment the reference count.
  *
  * @param user 	The user.
============================================================
--- libpurple/protocols/msn/userlist.c	2618c36e6fd09ac0b2ad29ea6b69c7a94f7863c6
+++ libpurple/protocols/msn/userlist.c	55316d6e01132e0c66b0e0e3048623b7366f1779
@@ -210,7 +210,7 @@ msn_userlist_destroy(MsnUserList *userli
 	/*destroy userlist*/
 	for (l = userlist->users; l != NULL; l = l->next)
 	{
-		msn_user_destroy(l->data);
+		msn_user_unref(l->data);
 	}
 	g_list_free(userlist->users);
 


More information about the Commits mailing list