/soc/2013/ankitkv/gobjectification: 58597c72e6ac: Moved dispose(...
Ankit Vani
a at nevitus.org
Tue Oct 1 08:11:57 EDT 2013
Changeset: 58597c72e6accc8d4c3c028b23bba77815d206c3
Author: Ankit Vani <a at nevitus.org>
Date: 2013-10-01 17:39 +0530
Branch: soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/58597c72e6ac
Description:
Moved dispose() code from PurplePluginInfo and PurpleProtocol to finalize()
diffstat:
libpurple/plugins.c | 12 ++----------
libpurple/protocol.c | 15 +++------------
2 files changed, 5 insertions(+), 22 deletions(-)
diffs (79 lines):
diff --git a/libpurple/plugins.c b/libpurple/plugins.c
--- a/libpurple/plugins.c
+++ b/libpurple/plugins.c
@@ -401,15 +401,6 @@ purple_plugin_info_constructed(GObject *
}
}
-/* GObject dispose function */
-static void
-purple_plugin_info_dispose(GObject *object)
-{
- PURPLE_DBUS_UNREGISTER_POINTER(object);
-
- parent_class->dispose(object);
-}
-
/* GObject finalize function */
static void
purple_plugin_info_finalize(GObject *object)
@@ -419,6 +410,8 @@ purple_plugin_info_finalize(GObject *obj
g_free(priv->ui_requirement);
g_free(priv->error);
+ PURPLE_DBUS_UNREGISTER_POINTER(object);
+
parent_class->finalize(object);
}
@@ -432,7 +425,6 @@ static void purple_plugin_info_class_ini
g_type_class_add_private(klass, sizeof(PurplePluginInfoPrivate));
obj_class->constructed = purple_plugin_info_constructed;
- obj_class->dispose = purple_plugin_info_dispose;
obj_class->finalize = purple_plugin_info_finalize;
/* Setup properties */
diff --git a/libpurple/protocol.c b/libpurple/protocol.c
--- a/libpurple/protocol.c
+++ b/libpurple/protocol.c
@@ -144,7 +144,7 @@ purple_protocol_init(GTypeInstance *inst
}
static void
-purple_protocol_dispose(GObject *object)
+purple_protocol_finalize(GObject *object)
{
PurpleProtocol *protocol = PURPLE_PROTOCOL(object);
GList *accounts, *l;
@@ -170,20 +170,12 @@ purple_protocol_dispose(GObject *object)
purple_prefs_disconnect_by_handle(protocol);
- PURPLE_DBUS_UNREGISTER_POINTER(protocol);
-
- parent_class->dispose(object);
-}
-
-static void
-purple_protocol_finalize(GObject *object)
-{
- PurpleProtocol *protocol = PURPLE_PROTOCOL(object);
-
user_splits_free(protocol);
protocol_options_free(protocol);
icon_spec_free(protocol);
+ PURPLE_DBUS_UNREGISTER_POINTER(protocol);
+
parent_class->finalize(object);
}
@@ -194,7 +186,6 @@ purple_protocol_class_init(PurpleProtoco
parent_class = g_type_class_peek_parent(klass);
- obj_class->dispose = purple_protocol_dispose;
obj_class->finalize = purple_protocol_finalize;
}
More information about the Commits
mailing list