/soc/2013/ankitkv/gobjectification: ed9d10d8e45a: Removed base_f...

Ankit Vani a at nevitus.org
Tue Sep 3 20:09:45 EDT 2013


Changeset: ed9d10d8e45a98ab32630ff66075a2e6db7423a5
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-09-04 05:33 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/ed9d10d8e45a

Description:

Removed base_finalize from protocols. There is no reason why it should be needed.

diffstat:

 libpurple/protocol.h                    |   2 --
 libpurple/protocols/bonjour/bonjour.c   |   2 --
 libpurple/protocols/gg/gg.c             |   2 --
 libpurple/protocols/irc/irc.c           |   2 --
 libpurple/protocols/jabber/facebook.c   |   2 --
 libpurple/protocols/jabber/gtalk.c      |   2 --
 libpurple/protocols/jabber/jabber.c     |   2 --
 libpurple/protocols/jabber/xmpp.c       |   1 -
 libpurple/protocols/msn/msn.c           |   2 --
 libpurple/protocols/mxit/mxit.c         |  11 -----------
 libpurple/protocols/myspace/myspace.c   |   2 --
 libpurple/protocols/novell/novell.c     |   2 --
 libpurple/protocols/null/nullprotocol.c |  15 ++++-----------
 libpurple/protocols/oscar/aim.c         |   2 --
 libpurple/protocols/oscar/icq.c         |   2 --
 libpurple/protocols/oscar/oscar.c       |   2 --
 libpurple/protocols/sametime/sametime.c |   3 ---
 libpurple/protocols/silc/silc.c         |   2 --
 libpurple/protocols/simple/simple.c     |   2 --
 libpurple/protocols/yahoo/yahoo.c       |   2 --
 libpurple/protocols/yahoo/yahoojp.c     |   2 --
 libpurple/protocols/zephyr/zephyr.c     |   3 ---
 22 files changed, 4 insertions(+), 63 deletions(-)

diffs (truncated from 313 to 300 lines):

diff --git a/libpurple/protocol.h b/libpurple/protocol.h
--- a/libpurple/protocol.h
+++ b/libpurple/protocol.h
@@ -573,7 +573,6 @@ struct _PurpleProtocolInterface
 				.instance_size = sizeof(TypeName), \
 				.class_size = sizeof(TypeName##Class), \
 				.base_init = (GBaseInitFunc)func_prefix##_base_init, \
-				.base_finalize = (GBaseFinalizeFunc)func_prefix##_base_finalize, \
 			}; \
 			static const GInterfaceInfo iface_info = { \
 				.interface_init = (GInterfaceInitFunc)func_prefix##_interface_init, \
@@ -600,7 +599,6 @@ struct _PurpleProtocolInterface
 				.instance_size = sizeof(TypeName), \
 				.class_size = sizeof(TypeName##Class), \
 				.base_init = (GBaseInitFunc)func_prefix##_base_init, \
-				.base_finalize = (GBaseFinalizeFunc)func_prefix##_base_finalize, \
 			}; \
 			static const GInterfaceInfo iface_info = { \
 				.interface_init = (GInterfaceInitFunc)func_prefix##_interface_init, \
diff --git a/libpurple/protocols/bonjour/bonjour.c b/libpurple/protocols/bonjour/bonjour.c
--- a/libpurple/protocols/bonjour/bonjour.c
+++ b/libpurple/protocols/bonjour/bonjour.c
@@ -685,8 +685,6 @@ bonjour_protocol_interface_init(PurplePr
 	iface->get_max_message_size = bonjour_get_max_message_size;
 }
 
-static void bonjour_protocol_base_finalize(BonjourProtocolClass *klass) { }
-
 static PurplePluginInfo *
 plugin_query(GError **error)
 {
diff --git a/libpurple/protocols/gg/gg.c b/libpurple/protocols/gg/gg.c
--- a/libpurple/protocols/gg/gg.c
+++ b/libpurple/protocols/gg/gg.c
@@ -1485,8 +1485,6 @@ ggp_protocol_interface_init(PurpleProtoc
 	iface->get_max_message_size   = ggp_get_max_message_size;
 }
 
-static void ggp_protocol_base_finalize(GGPProtocolClass *klass) { }
-
 static PurplePluginInfo *
 plugin_query(GError **error)
 {
diff --git a/libpurple/protocols/irc/irc.c b/libpurple/protocols/irc/irc.c
--- a/libpurple/protocols/irc/irc.c
+++ b/libpurple/protocols/irc/irc.c
@@ -1003,8 +1003,6 @@ irc_protocol_interface_init(PurpleProtoc
 	iface->get_max_message_size = irc_get_max_message_size;
 }
 
-static void irc_protocol_base_finalize(IRCProtocolClass *klass) { }
-
 static PurplePluginInfo *
 plugin_query(GError **error)
 {
diff --git a/libpurple/protocols/jabber/facebook.c b/libpurple/protocols/jabber/facebook.c
--- a/libpurple/protocols/jabber/facebook.c
+++ b/libpurple/protocols/jabber/facebook.c
@@ -127,8 +127,6 @@ facebook_protocol_interface_init(PurpleP
 	iface->get_moods           = NULL;
 }
 
-static void facebook_protocol_base_finalize(FacebookProtocolClass *klass) { }
-
 extern PurplePlugin *_jabber_plugin;
 PURPLE_PROTOCOL_DEFINE_EXTENDED(_jabber_plugin, FacebookProtocol,
                                 facebook_protocol, JABBER_TYPE_PROTOCOL, 0);
diff --git a/libpurple/protocols/jabber/gtalk.c b/libpurple/protocols/jabber/gtalk.c
--- a/libpurple/protocols/jabber/gtalk.c
+++ b/libpurple/protocols/jabber/gtalk.c
@@ -120,8 +120,6 @@ gtalk_protocol_interface_init(PurpleProt
 	iface->unregister_user  = NULL;
 }
 
-static void gtalk_protocol_base_finalize(GTalkProtocolClass *klass) { }
-
 extern PurplePlugin *_jabber_plugin;
 PURPLE_PROTOCOL_DEFINE_EXTENDED(_jabber_plugin, GTalkProtocol, gtalk_protocol,
                                 JABBER_TYPE_PROTOCOL, 0);
diff --git a/libpurple/protocols/jabber/jabber.c b/libpurple/protocols/jabber/jabber.c
--- a/libpurple/protocols/jabber/jabber.c
+++ b/libpurple/protocols/jabber/jabber.c
@@ -4209,8 +4209,6 @@ jabber_protocol_interface_init(PurplePro
 	iface->get_moods               = jabber_get_moods;
 }
 
-static void jabber_protocol_base_finalize(JabberProtocolClass *klass) { }
-
 PURPLE_PROTOCOL_DEFINE_EXTENDED(_jabber_plugin, JabberProtocol, jabber_protocol,
                                 PURPLE_TYPE_PROTOCOL, G_TYPE_FLAG_ABSTRACT);
 
diff --git a/libpurple/protocols/jabber/xmpp.c b/libpurple/protocols/jabber/xmpp.c
--- a/libpurple/protocols/jabber/xmpp.c
+++ b/libpurple/protocols/jabber/xmpp.c
@@ -103,7 +103,6 @@ xmpp_protocol_base_init(XMPPProtocolClas
 	purple_prefs_remove("/protocols/jabber");
 }
 
-static void xmpp_protocol_base_finalize(XMPPProtocolClass *klass) { }
 static void xmpp_protocol_interface_init(PurpleProtocolInterface *iface) { }
 
 extern PurplePlugin *_jabber_plugin;
diff --git a/libpurple/protocols/msn/msn.c b/libpurple/protocols/msn/msn.c
--- a/libpurple/protocols/msn/msn.c
+++ b/libpurple/protocols/msn/msn.c
@@ -2971,8 +2971,6 @@ msn_protocol_interface_init(PurpleProtoc
 	iface->get_max_message_size   = msn_get_max_message_size;
 }
 
-static void msn_protocol_base_finalize(MsnProtocolClass *klass) { }
-
 static PurplePluginInfo *
 plugin_query(GError **error)
 {
diff --git a/libpurple/protocols/mxit/mxit.c b/libpurple/protocols/mxit/mxit.c
--- a/libpurple/protocols/mxit/mxit.c
+++ b/libpurple/protocols/mxit/mxit.c
@@ -810,17 +810,6 @@ mxit_protocol_interface_init( PurpleProt
 
 
 /*------------------------------------------------------------------------
- * Finalizing the MXit class.
- *
- *  @param klass	The MXit class
- */
-static void
-mxit_protocol_base_finalize( MXitProtocolClass *klass )
-{
-}
-
-
-/*------------------------------------------------------------------------
  * Querying the MXit plugin.
  *
  *  @param error	Query error (if any)
diff --git a/libpurple/protocols/myspace/myspace.c b/libpurple/protocols/myspace/myspace.c
--- a/libpurple/protocols/myspace/myspace.c
+++ b/libpurple/protocols/myspace/myspace.c
@@ -3456,8 +3456,6 @@ msim_protocol_interface_init(PurpleProto
 	iface->get_account_text_table = msim_get_account_text_table;
 }
 
-static void msim_protocol_base_finalize(MsimProtocolClass *klass) { }
-
 /**
  * Query the plugin
  */
diff --git a/libpurple/protocols/novell/novell.c b/libpurple/protocols/novell/novell.c
--- a/libpurple/protocols/novell/novell.c
+++ b/libpurple/protocols/novell/novell.c
@@ -3537,8 +3537,6 @@ novell_protocol_interface_init(PurplePro
 	iface->get_max_message_size = novell_get_max_message_size;
 }
 
-static void novell_protocol_base_finalize(NovellProtocolClass *klass) { }
-
 static PurplePluginInfo *
 plugin_query(GError **error)
 {
diff --git a/libpurple/protocols/null/nullprotocol.c b/libpurple/protocols/null/nullprotocol.c
--- a/libpurple/protocols/null/nullprotocol.c
+++ b/libpurple/protocols/null/nullprotocol.c
@@ -1083,22 +1083,11 @@ null_protocol_base_init(NullProtocolClas
     "example",                /* pref name */
     "default");               /* default value */
 
-  purple_debug_info("nullprotocol", "starting up\n");
-
   proto_class->user_splits = g_list_append(NULL, split);
   proto_class->protocol_options = g_list_append(NULL, option);
 }
 
 /*
- * Finalize the protocol class.
- */
-static void
-null_protocol_base_finalize(NullProtocolClass *klass)
-{
-  purple_debug_info("nullprotocol", "shutting down\n");
-}
-
-/*
  * Initialize the protocol interface. see protocol.h for more information.
  */
 static void
@@ -1182,6 +1171,8 @@ plugin_load(PurplePlugin *plugin, GError
   if (!my_protocol)
     return FALSE;
 
+  purple_debug_info("nullprotocol", "starting up\n");
+
   /* get ready to store offline messages */
   goffline_messages = g_hash_table_new_full(g_str_hash,  /* hash fn */
                                             g_str_equal, /* key comparison fn */
@@ -1214,6 +1205,8 @@ plugin_unload(PurplePlugin *plugin, GErr
     cmds = g_slist_delete_link(cmds, cmds);
   }
 
+  purple_debug_info("nullprotocol", "shutting down\n");
+
   /* remove the protocol from the core */
   if (!purple_protocols_remove(my_protocol, error))
     return FALSE;
diff --git a/libpurple/protocols/oscar/aim.c b/libpurple/protocols/oscar/aim.c
--- a/libpurple/protocols/oscar/aim.c
+++ b/libpurple/protocols/oscar/aim.c
@@ -57,8 +57,6 @@ aim_protocol_interface_init(PurpleProtoc
 	iface->get_max_message_size = oscar_get_max_message_size;
 }
 
-static void aim_protocol_base_finalize(AIMProtocolClass *klass) { }
-
 extern PurplePlugin *_oscar_plugin;
 PURPLE_PROTOCOL_DEFINE_EXTENDED(_oscar_plugin, AIMProtocol, aim_protocol,
                                 OSCAR_TYPE_PROTOCOL, 0);
diff --git a/libpurple/protocols/oscar/icq.c b/libpurple/protocols/oscar/icq.c
--- a/libpurple/protocols/oscar/icq.c
+++ b/libpurple/protocols/oscar/icq.c
@@ -71,8 +71,6 @@ icq_protocol_interface_init(PurpleProtoc
 	iface->get_max_message_size   = icq_get_max_message_size;
 }
 
-static void icq_protocol_base_finalize(ICQProtocolClass *klass) { }
-
 extern PurplePlugin *_oscar_plugin;
 PURPLE_PROTOCOL_DEFINE_EXTENDED(_oscar_plugin, ICQProtocol, icq_protocol,
                                 OSCAR_TYPE_PROTOCOL, 0);
diff --git a/libpurple/protocols/oscar/oscar.c b/libpurple/protocols/oscar/oscar.c
--- a/libpurple/protocols/oscar/oscar.c
+++ b/libpurple/protocols/oscar/oscar.c
@@ -5636,8 +5636,6 @@ oscar_protocol_interface_init(PurpleProt
 	iface->offline_message    = oscar_offline_message;
 }
 
-static void oscar_protocol_base_finalize(OscarProtocolClass *klass) { }
-
 PURPLE_PROTOCOL_DEFINE_EXTENDED(_oscar_plugin, OscarProtocol, oscar_protocol,
                                 PURPLE_TYPE_PROTOCOL, G_TYPE_FLAG_ABSTRACT);
 
diff --git a/libpurple/protocols/sametime/sametime.c b/libpurple/protocols/sametime/sametime.c
--- a/libpurple/protocols/sametime/sametime.c
+++ b/libpurple/protocols/sametime/sametime.c
@@ -5722,9 +5722,6 @@ mw_protocol_interface_init(PurpleProtoco
 }
 
 
-static void mw_protocol_base_finalize(mwProtocolClass *klass) { }
-
-
 static PurplePluginInfo *
 plugin_query(GError **error)
 {
diff --git a/libpurple/protocols/silc/silc.c b/libpurple/protocols/silc/silc.c
--- a/libpurple/protocols/silc/silc.c
+++ b/libpurple/protocols/silc/silc.c
@@ -2246,8 +2246,6 @@ silcpurple_protocol_interface_init(Purpl
 	iface->new_xfer           = silcpurple_ftp_new_xfer;
 }
 
-static void silcpurple_protocol_base_finalize(SilcProtocolClass *klass) { }
-
 static PurplePluginInfo *
 plugin_query(GError **error)
 {
diff --git a/libpurple/protocols/simple/simple.c b/libpurple/protocols/simple/simple.c
--- a/libpurple/protocols/simple/simple.c
+++ b/libpurple/protocols/simple/simple.c
@@ -2095,8 +2095,6 @@ simple_protocol_interface_init(PurplePro
 	iface->send_raw     = simple_send_raw;
 }
 
-static void simple_protocol_base_finalize(SIMPLEProtocolClass *klass) { }
-
 static PurplePluginInfo *
 plugin_query(GError **error)
 {
diff --git a/libpurple/protocols/yahoo/yahoo.c b/libpurple/protocols/yahoo/yahoo.c
--- a/libpurple/protocols/yahoo/yahoo.c
+++ b/libpurple/protocols/yahoo/yahoo.c
@@ -299,8 +299,6 @@ yahoo_protocol_interface_init(PurpleProt
 	iface->get_max_message_size     = yahoo_get_max_message_size;
 }
 
-static void yahoo_protocol_base_finalize(YahooProtocolClass *klass) { }
-
 static PurplePluginInfo *
 plugin_query(GError **error)
 {
diff --git a/libpurple/protocols/yahoo/yahoojp.c b/libpurple/protocols/yahoo/yahoojp.c
--- a/libpurple/protocols/yahoo/yahoojp.c
+++ b/libpurple/protocols/yahoo/yahoojp.c
@@ -119,8 +119,6 @@ yahoojp_protocol_interface_init(PurplePr
 	iface->get_account_text_table = yahoojp_get_account_text_table;
 }
 
-static void yahoojp_protocol_base_finalize(YahooJPProtocolClass *klass) { }
-
 extern PurplePlugin *_yahoo_plugin;
 PURPLE_PROTOCOL_DEFINE_EXTENDED(_yahoo_plugin, YahooJPProtocol,
                                 yahoojp_protocol, YAHOO_TYPE_PROTOCOL, 0);



More information about the Commits mailing list