/soc/2013/ankitkv/gobjectification: 9b5c7e27c8d9: Use purple_plu...

Ankit Vani a at nevitus.org
Sat Feb 22 16:13:24 EST 2014


Changeset: 9b5c7e27c8d9ef4e287670c588b121016475b8bd
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2014-02-23 02:43 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/9b5c7e27c8d9

Description:

Use purple_plugin_action_new to create a new PurplePluginAction in its GBoxed copy function

diffstat:

 libpurple/plugins.c |  9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

diffs (21 lines):

diff --git a/libpurple/plugins.c b/libpurple/plugins.c
--- a/libpurple/plugins.c
+++ b/libpurple/plugins.c
@@ -881,16 +881,9 @@ purple_plugin_action_free(PurplePluginAc
 static PurplePluginAction *
 purple_plugin_action_copy(PurplePluginAction *action)
 {
-	PurplePluginAction *action_copy;
-
 	g_return_val_if_fail(action != NULL, NULL);
 
-	action_copy = g_new(PurplePluginAction, 1);
-	*action_copy = *action;
-
-	action_copy->label    = g_strdup(action->label);
-
-	return action_copy;
+	return purple_plugin_action_new(action->label, action->callback);
 }
 
 GType



More information about the Commits mailing list