/pidgin/main: 7fcfcf147b99: Use g_free as UiOps structures GBoxe...

Ankit Vani a at nevitus.org
Sat Feb 22 15:13:35 EST 2014


Changeset: 7fcfcf147b9951fbcc9e8eb9617551836ab35005
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2014-02-23 01:43 +0530
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/7fcfcf147b99

Description:

Use g_free as UiOps structures GBoxed free function

diffstat:

 libpurple/accounts.c     |  10 +---------
 libpurple/buddylist.c    |  10 +---------
 libpurple/connection.c   |  10 +---------
 libpurple/conversation.c |  10 +---------
 libpurple/core.c         |  10 +---------
 libpurple/debug.c        |  10 +---------
 libpurple/dnsquery.c     |  10 +---------
 libpurple/dnssrv.c       |  10 +---------
 libpurple/eventloop.c    |  10 +---------
 libpurple/idle.c         |  10 +---------
 libpurple/notify.c       |  10 +---------
 libpurple/request.c      |  10 +---------
 libpurple/roomlist.c     |  10 +---------
 libpurple/sound.c        |  10 +---------
 libpurple/whiteboard.c   |  10 +---------
 libpurple/xfer.c         |  10 +---------
 16 files changed, 16 insertions(+), 144 deletions(-)

diffs (truncated from 432 to 300 lines):

diff --git a/libpurple/accounts.c b/libpurple/accounts.c
--- a/libpurple/accounts.c
+++ b/libpurple/accounts.c
@@ -834,14 +834,6 @@ purple_account_ui_ops_copy(PurpleAccount
 	return ops_new;
 }
 
-static void
-purple_account_ui_ops_free(PurpleAccountUiOps *ops)
-{
-	g_return_if_fail(ops != NULL);
-
-	g_free(ops);
-}
-
 GType
 purple_account_ui_ops_get_type(void)
 {
@@ -850,7 +842,7 @@ purple_account_ui_ops_get_type(void)
 	if (type == 0) {
 		type = g_boxed_type_register_static("PurpleAccountUiOps",
 				(GBoxedCopyFunc)purple_account_ui_ops_copy,
-				(GBoxedFreeFunc)purple_account_ui_ops_free);
+				(GBoxedFreeFunc)g_free);
 	}
 
 	return type;
diff --git a/libpurple/buddylist.c b/libpurple/buddylist.c
--- a/libpurple/buddylist.c
+++ b/libpurple/buddylist.c
@@ -2032,14 +2032,6 @@ purple_blist_ui_ops_copy(PurpleBlistUiOp
 	return ops_new;
 }
 
-static void
-purple_blist_ui_ops_free(PurpleBlistUiOps *ops)
-{
-	g_return_if_fail(ops != NULL);
-
-	g_free(ops);
-}
-
 GType
 purple_blist_ui_ops_get_type(void)
 {
@@ -2048,7 +2040,7 @@ purple_blist_ui_ops_get_type(void)
 	if (type == 0) {
 		type = g_boxed_type_register_static("PurpleBlistUiOps",
 				(GBoxedCopyFunc)purple_blist_ui_ops_copy,
-				(GBoxedFreeFunc)purple_blist_ui_ops_free);
+				(GBoxedFreeFunc)g_free);
 	}
 
 	return type;
diff --git a/libpurple/connection.c b/libpurple/connection.c
--- a/libpurple/connection.c
+++ b/libpurple/connection.c
@@ -606,14 +606,6 @@ purple_connection_ui_ops_copy(PurpleConn
 	return ops_new;
 }
 
-static void
-purple_connection_ui_ops_free(PurpleConnectionUiOps *ops)
-{
-	g_return_if_fail(ops != NULL);
-
-	g_free(ops);
-}
-
 GType
 purple_connection_ui_ops_get_type(void)
 {
@@ -622,7 +614,7 @@ purple_connection_ui_ops_get_type(void)
 	if (type == 0) {
 		type = g_boxed_type_register_static("PurpleConnectionUiOps",
 				(GBoxedCopyFunc)purple_connection_ui_ops_copy,
-				(GBoxedFreeFunc)purple_connection_ui_ops_free);
+				(GBoxedFreeFunc)g_free);
 	}
 
 	return type;
diff --git a/libpurple/conversation.c b/libpurple/conversation.c
--- a/libpurple/conversation.c
+++ b/libpurple/conversation.c
@@ -310,14 +310,6 @@ purple_conversation_ui_ops_copy(PurpleCo
 	return ops_new;
 }
 
-static void
-purple_conversation_ui_ops_free(PurpleConversationUiOps *ops)
-{
-	g_return_if_fail(ops != NULL);
-
-	g_free(ops);
-}
-
 GType
 purple_conversation_ui_ops_get_type(void)
 {
@@ -326,7 +318,7 @@ purple_conversation_ui_ops_get_type(void
 	if (type == 0) {
 		type = g_boxed_type_register_static("PurpleConversationUiOps",
 				(GBoxedCopyFunc)purple_conversation_ui_ops_copy,
-				(GBoxedFreeFunc)purple_conversation_ui_ops_free);
+				(GBoxedFreeFunc)g_free);
 	}
 
 	return type;
diff --git a/libpurple/core.c b/libpurple/core.c
--- a/libpurple/core.c
+++ b/libpurple/core.c
@@ -353,14 +353,6 @@ purple_core_ui_ops_copy(PurpleCoreUiOps 
 	return ops_new;
 }
 
-static void
-purple_core_ui_ops_free(PurpleCoreUiOps *ops)
-{
-	g_return_if_fail(ops != NULL);
-
-	g_free(ops);
-}
-
 GType
 purple_core_ui_ops_get_type(void)
 {
@@ -369,7 +361,7 @@ purple_core_ui_ops_get_type(void)
 	if (type == 0) {
 		type = g_boxed_type_register_static("PurpleCoreUiOps",
 				(GBoxedCopyFunc)purple_core_ui_ops_copy,
-				(GBoxedFreeFunc)purple_core_ui_ops_free);
+				(GBoxedFreeFunc)g_free);
 	}
 
 	return type;
diff --git a/libpurple/debug.c b/libpurple/debug.c
--- a/libpurple/debug.c
+++ b/libpurple/debug.c
@@ -207,14 +207,6 @@ purple_debug_ui_ops_copy(PurpleDebugUiOp
 	return ops_new;
 }
 
-static void
-purple_debug_ui_ops_free(PurpleDebugUiOps *ops)
-{
-	g_return_if_fail(ops != NULL);
-
-	g_free(ops);
-}
-
 GType
 purple_debug_ui_ops_get_type(void)
 {
@@ -223,7 +215,7 @@ purple_debug_ui_ops_get_type(void)
 	if (type == 0) {
 		type = g_boxed_type_register_static("PurpleDebugUiOps",
 				(GBoxedCopyFunc)purple_debug_ui_ops_copy,
-				(GBoxedFreeFunc)purple_debug_ui_ops_free);
+				(GBoxedFreeFunc)g_free);
 	}
 
 	return type;
diff --git a/libpurple/dnsquery.c b/libpurple/dnsquery.c
--- a/libpurple/dnsquery.c
+++ b/libpurple/dnsquery.c
@@ -1022,14 +1022,6 @@ purple_dnsquery_ui_ops_copy(PurpleDnsQue
 	return ops_new;
 }
 
-static void
-purple_dnsquery_ui_ops_free(PurpleDnsQueryUiOps *ops)
-{
-	g_return_if_fail(ops != NULL);
-
-	g_free(ops);
-}
-
 GType
 purple_dnsquery_ui_ops_get_type(void)
 {
@@ -1038,7 +1030,7 @@ purple_dnsquery_ui_ops_get_type(void)
 	if (type == 0) {
 		type = g_boxed_type_register_static("PurpleDnsQueryUiOps",
 				(GBoxedCopyFunc)purple_dnsquery_ui_ops_copy,
-				(GBoxedFreeFunc)purple_dnsquery_ui_ops_free);
+				(GBoxedFreeFunc)g_free);
 	}
 
 	return type;
diff --git a/libpurple/dnssrv.c b/libpurple/dnssrv.c
--- a/libpurple/dnssrv.c
+++ b/libpurple/dnssrv.c
@@ -1127,14 +1127,6 @@ purple_srv_txt_query_ui_ops_copy(PurpleS
 	return ops_new;
 }
 
-static void
-purple_srv_txt_query_ui_ops_free(PurpleSrvTxtQueryUiOps *ops)
-{
-	g_return_if_fail(ops != NULL);
-
-	g_free(ops);
-}
-
 GType
 purple_srv_txt_query_ui_ops_get_type(void)
 {
@@ -1143,7 +1135,7 @@ purple_srv_txt_query_ui_ops_get_type(voi
 	if (type == 0) {
 		type = g_boxed_type_register_static("PurpleSrvTxtQueryUiOps",
 				(GBoxedCopyFunc)purple_srv_txt_query_ui_ops_copy,
-				(GBoxedFreeFunc)purple_srv_txt_query_ui_ops_free);
+				(GBoxedFreeFunc)g_free);
 	}
 
 	return type;
diff --git a/libpurple/eventloop.c b/libpurple/eventloop.c
--- a/libpurple/eventloop.c
+++ b/libpurple/eventloop.c
@@ -126,14 +126,6 @@ purple_eventloop_ui_ops_copy(PurpleEvent
 	return ops_new;
 }
 
-static void
-purple_eventloop_ui_ops_free(PurpleEventLoopUiOps *ops)
-{
-	g_return_if_fail(ops != NULL);
-
-	g_free(ops);
-}
-
 GType
 purple_eventloop_ui_ops_get_type(void)
 {
@@ -142,7 +134,7 @@ purple_eventloop_ui_ops_get_type(void)
 	if (type == 0) {
 		type = g_boxed_type_register_static("PurpleEventLoopUiOps",
 				(GBoxedCopyFunc)purple_eventloop_ui_ops_copy,
-				(GBoxedFreeFunc)purple_eventloop_ui_ops_free);
+				(GBoxedFreeFunc)g_free);
 	}
 
 	return type;
diff --git a/libpurple/idle.c b/libpurple/idle.c
--- a/libpurple/idle.c
+++ b/libpurple/idle.c
@@ -294,14 +294,6 @@ purple_idle_ui_ops_copy(PurpleIdleUiOps 
 	return ops_new;
 }
 
-static void
-purple_idle_ui_ops_free(PurpleIdleUiOps *ops)
-{
-	g_return_if_fail(ops != NULL);
-
-	g_free(ops);
-}
-
 GType
 purple_idle_ui_ops_get_type(void)
 {
@@ -310,7 +302,7 @@ purple_idle_ui_ops_get_type(void)
 	if (type == 0) {
 		type = g_boxed_type_register_static("PurpleIdleUiOps",
 				(GBoxedCopyFunc)purple_idle_ui_ops_copy,
-				(GBoxedFreeFunc)purple_idle_ui_ops_free);
+				(GBoxedFreeFunc)g_free);
 	}
 
 	return type;
diff --git a/libpurple/notify.c b/libpurple/notify.c
--- a/libpurple/notify.c
+++ b/libpurple/notify.c
@@ -846,14 +846,6 @@ purple_notify_ui_ops_copy(PurpleNotifyUi
 	return ops_new;
 }
 
-static void
-purple_notify_ui_ops_free(PurpleNotifyUiOps *ops)
-{
-	g_return_if_fail(ops != NULL);
-
-	g_free(ops);
-}
-
 GType
 purple_notify_ui_ops_get_type(void)
 {
@@ -862,7 +854,7 @@ purple_notify_ui_ops_get_type(void)
 	if (type == 0) {
 		type = g_boxed_type_register_static("PurpleNotifyUiOps",
 				(GBoxedCopyFunc)purple_notify_ui_ops_copy,
-				(GBoxedFreeFunc)purple_notify_ui_ops_free);
+				(GBoxedFreeFunc)g_free);
 	}
 
 	return type;
diff --git a/libpurple/request.c b/libpurple/request.c
--- a/libpurple/request.c
+++ b/libpurple/request.c



More information about the Commits mailing list