/soc/2013/ankitkv/gobjectification: 38a5613c3e26: Prepended func...

Ankit Vani a at nevitus.org
Sat Jul 13 13:05:46 EDT 2013


Changeset: 38a5613c3e265ebab163a1daf36cf4453c7e3408
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-07-13 22:35 +0530
Branch:	 soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/38a5613c3e26

Description:

Prepended functions private to a subsystem but used over multiple files by underscore

diffstat:

 libpurple/account.c        |   6 +++---
 libpurple/accounts.c       |   6 +++---
 libpurple/blistnodetypes.c |   6 +++---
 libpurple/buddylist.c      |  12 ++++++------
 4 files changed, 15 insertions(+), 15 deletions(-)

diffs (147 lines):

diff --git a/libpurple/account.c b/libpurple/account.c
--- a/libpurple/account.c
+++ b/libpurple/account.c
@@ -135,7 +135,7 @@ enum
 static GObjectClass  *parent_class = NULL;
 static GList         *handles = NULL;
 
-void purple_account_set_current_error(PurpleAccount *account,
+void _purple_account_set_current_error(PurpleAccount *account,
 		PurpleConnectionErrorInfo *new_err);
 
 /***************
@@ -2383,7 +2383,7 @@ gboolean purple_account_supports_offline
 }
 
 void
-purple_account_set_current_error(PurpleAccount *account,
+_purple_account_set_current_error(PurpleAccount *account,
 		PurpleConnectionErrorInfo *new_err)
 {
 	PurpleConnectionErrorInfo *old_err;
@@ -2422,7 +2422,7 @@ purple_account_get_current_error(PurpleA
 void
 purple_account_clear_current_error(PurpleAccount *account)
 {
-	purple_account_set_current_error(account, NULL);
+	_purple_account_set_current_error(account, NULL);
 }
 
 static xmlnode *
diff --git a/libpurple/accounts.c b/libpurple/accounts.c
--- a/libpurple/accounts.c
+++ b/libpurple/accounts.c
@@ -37,7 +37,7 @@ static GList   *accounts = NULL;
 static guint    save_timer = 0;
 static gboolean accounts_loaded = FALSE;
 
-void purple_account_set_current_error(PurpleAccount *account,
+void _purple_account_set_current_error(PurpleAccount *account,
 		PurpleConnectionErrorInfo *new_err);
 
 /*********************************************************************
@@ -457,7 +457,7 @@ parse_current_error(xmlnode *node, Purpl
 	current_error->type = type;
 	current_error->description = description;
 
-	purple_account_set_current_error(account, current_error);
+	_purple_account_set_current_error(account, current_error);
 }
 
 static PurpleAccount *
@@ -888,7 +888,7 @@ connection_error_cb(PurpleConnection *gc
 	err->type = type;
 	err->description = g_strdup(description);
 
-	purple_account_set_current_error(account, err);
+	_purple_account_set_current_error(account, err);
 
 	purple_signal_emit(purple_accounts_get_handle(), "account-connection-error",
 	                   account, type, description);
diff --git a/libpurple/blistnodetypes.c b/libpurple/blistnodetypes.c
--- a/libpurple/blistnodetypes.c
+++ b/libpurple/blistnodetypes.c
@@ -139,7 +139,7 @@ purple_strings_are_different(const char 
 			((one == NULL || *one == '\0') && (two == NULL || *two == '\0')));
 }
 
-PurpleBListNode *purple_blist_get_last_child(PurpleBListNode *node);
+PurpleBListNode *_purple_blist_get_last_child(PurpleBListNode *node);
 
 /**************************************************************************/
 /* Buddy API                                                              */
@@ -939,7 +939,7 @@ void purple_contact_merge(PurpleContact 
 
 	if (PURPLE_IS_CONTACT(node)) {
 		target = (PurpleContact *)node;
-		prev = purple_blist_get_last_child(node);
+		prev = _purple_blist_get_last_child(node);
 	} else if (PURPLE_IS_BUDDY(node)) {
 		target = (PurpleContact *)node->parent;
 		prev = node;
@@ -1456,7 +1456,7 @@ void purple_group_set_name(PurpleGroup *
 		/* We're merging two groups */
 		PurpleBListNode *prev, *child, *next;
 
-		prev = purple_blist_get_last_child((PurpleBListNode*)dest);
+		prev = _purple_blist_get_last_child((PurpleBListNode*)dest);
 		child = PURPLE_BLIST_NODE(source)->child;
 
 		/*
diff --git a/libpurple/buddylist.c b/libpurple/buddylist.c
--- a/libpurple/buddylist.c
+++ b/libpurple/buddylist.c
@@ -55,7 +55,7 @@ static GHashTable *groups_cache = NULL;
 static guint          save_timer = 0;
 static gboolean       blist_loaded = FALSE;
 
-PurpleBListNode *purple_blist_get_last_child(PurpleBListNode *node);
+PurpleBListNode *_purple_blist_get_last_child(PurpleBListNode *node);
 
 /*********************************************************************
  * Private utility functions                                         *
@@ -71,7 +71,7 @@ static PurpleBListNode *purple_blist_get
 	return n;
 }
 
-PurpleBListNode *purple_blist_get_last_child(PurpleBListNode *node)
+PurpleBListNode *_purple_blist_get_last_child(PurpleBListNode *node)
 {
 	if (!node)
 		return NULL;
@@ -484,7 +484,7 @@ parse_buddy(PurpleGroup *group, PurpleCo
 
 	buddy = purple_buddy_new(account, name, alias);
 	purple_blist_add_buddy(buddy, contact, group,
-			purple_blist_get_last_child((PurpleBListNode*)contact));
+			_purple_blist_get_last_child((PurpleBListNode*)contact));
 
 	for (x = xmlnode_get_child(bnode, "setting"); x; x = xmlnode_get_next_twin(x)) {
 		parse_setting((PurpleBListNode*)buddy, x);
@@ -502,7 +502,7 @@ parse_contact(PurpleGroup *group, xmlnod
 	const char *alias;
 
 	purple_blist_add_contact(contact, group,
-			purple_blist_get_last_child((PurpleBListNode*)group));
+			_purple_blist_get_last_child((PurpleBListNode*)group));
 
 	if ((alias = xmlnode_get_attrib(cnode, "alias"))) {
 		purple_contact_set_alias(contact, alias);
@@ -559,7 +559,7 @@ parse_chat(PurpleGroup *group, xmlnode *
 
 	chat = purple_chat_new(account, alias, components);
 	purple_blist_add_chat(chat, group,
-			purple_blist_get_last_child((PurpleBListNode*)group));
+			_purple_blist_get_last_child((PurpleBListNode*)group));
 
 	for (x = xmlnode_get_child(cnode, "setting"); x; x = xmlnode_get_next_twin(x)) {
 		parse_setting((PurpleBListNode*)chat, x);
@@ -932,7 +932,7 @@ void purple_blist_add_buddy(PurpleBuddy 
 		}
 		c = purple_contact_new();
 		purple_blist_add_contact(c, g,
-				purple_blist_get_last_child((PurpleBListNode*)g));
+				_purple_blist_get_last_child((PurpleBListNode*)g));
 	}
 
 	cnode = PURPLE_BLIST_NODE(c);



More information about the Commits mailing list