/soc/2013/ankitkv/gobjectification: 759ea31715dd: Refactored cmd...
Ankit Vani
a at nevitus.org
Wed Jul 17 16:22:19 EDT 2013
Changeset: 759ea31715dd128639a33a8f9d1f152cf3e2a5ee
Author: Ankit Vani <a at nevitus.org>
Date: 2013-07-18 01:44 +0530
Branch: soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/759ea31715dd
Description:
Refactored cmds and connection to use GType instead of PurpleValue
diffstat:
libpurple/cmds.c | 10 ++++------
libpurple/connection.c | 33 +++++++++++++--------------------
2 files changed, 17 insertions(+), 26 deletions(-)
diffs (74 lines):
diff --git a/libpurple/cmds.c b/libpurple/cmds.c
--- a/libpurple/cmds.c
+++ b/libpurple/cmds.c
@@ -369,13 +369,11 @@ void purple_cmds_init(void)
gpointer handle = purple_cmds_get_handle();
purple_signal_register(handle, "cmd-added",
- purple_marshal_VOID__POINTER_INT_INT, NULL, 3,
- purple_value_new(PURPLE_TYPE_STRING),
- purple_value_new(PURPLE_TYPE_INT),
- purple_value_new(PURPLE_TYPE_INT));
+ purple_marshal_VOID__POINTER_INT_INT, G_TYPE_NONE, 3,
+ G_TYPE_STRING, G_TYPE_INT, G_TYPE_INT);
purple_signal_register(handle, "cmd-removed",
- purple_marshal_VOID__POINTER, NULL, 1,
- purple_value_new(PURPLE_TYPE_STRING));
+ purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
+ G_TYPE_STRING);
}
void purple_cmds_uninit(void)
diff --git a/libpurple/connection.c b/libpurple/connection.c
--- a/libpurple/connection.c
+++ b/libpurple/connection.c
@@ -1036,36 +1036,29 @@ purple_connections_init(void)
void *handle = purple_connections_get_handle();
purple_signal_register(handle, "signing-on",
- purple_marshal_VOID__POINTER, NULL, 1,
- purple_value_new(PURPLE_TYPE_SUBTYPE,
- PURPLE_SUBTYPE_CONNECTION));
+ purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
+ PURPLE_TYPE_CONNECTION);
purple_signal_register(handle, "signed-on",
- purple_marshal_VOID__POINTER, NULL, 1,
- purple_value_new(PURPLE_TYPE_SUBTYPE,
- PURPLE_SUBTYPE_CONNECTION));
+ purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
+ PURPLE_TYPE_CONNECTION);
purple_signal_register(handle, "signing-off",
- purple_marshal_VOID__POINTER, NULL, 1,
- purple_value_new(PURPLE_TYPE_SUBTYPE,
- PURPLE_SUBTYPE_CONNECTION));
+ purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
+ PURPLE_TYPE_CONNECTION);
purple_signal_register(handle, "signed-off",
- purple_marshal_VOID__POINTER, NULL, 1,
- purple_value_new(PURPLE_TYPE_SUBTYPE,
- PURPLE_SUBTYPE_CONNECTION));
+ purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
+ PURPLE_TYPE_CONNECTION);
purple_signal_register(handle, "connection-error",
- purple_marshal_VOID__POINTER_INT_POINTER, NULL, 3,
- purple_value_new(PURPLE_TYPE_SUBTYPE,
- PURPLE_SUBTYPE_CONNECTION),
- purple_value_new(PURPLE_TYPE_ENUM),
- purple_value_new(PURPLE_TYPE_STRING));
+ purple_marshal_VOID__POINTER_INT_POINTER,
+ G_TYPE_NONE, 3, PURPLE_TYPE_CONNECTION,
+ PURPLE_TYPE_CONNECTION_ERROR, G_TYPE_STRING);
purple_signal_register(handle, "autojoin",
- purple_marshal_BOOLEAN__POINTER, NULL, 1,
- purple_value_new(PURPLE_TYPE_SUBTYPE,
- PURPLE_SUBTYPE_CONNECTION));
+ purple_marshal_BOOLEAN__POINTER, G_TYPE_NONE, 1,
+ PURPLE_TYPE_CONNECTION);
}
More information about the Commits
mailing list