/soc/2013/ankitkv/gobjectification: a65e961e1e29: Refactored cor...
Ankit Vani
a at nevitus.org
Wed Jul 17 17:34:43 EDT 2013
Changeset: a65e961e1e296380f2602793f8a866ced6499c62
Author: Ankit Vani <a at nevitus.org>
Date: 2013-07-18 03:03 +0530
Branch: soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/a65e961e1e29
Description:
Refactored core, ft, imgstore to use GType instead of PurpleValue
diffstat:
libpurple/core.c | 14 ++++++++------
libpurple/ft.c | 45 ++++++++++++++++++---------------------------
libpurple/imgstore.c | 6 ++----
3 files changed, 28 insertions(+), 37 deletions(-)
diffs (104 lines):
diff --git a/libpurple/core.c b/libpurple/core.c
--- a/libpurple/core.c
+++ b/libpurple/core.c
@@ -111,13 +111,15 @@ purple_core_init(const char *ui)
purple_signal_register(core, "uri-handler",
purple_marshal_BOOLEAN__POINTER_POINTER_POINTER,
- purple_value_new(PURPLE_TYPE_BOOLEAN), 3,
- purple_value_new(PURPLE_TYPE_STRING), /* Protocol */
- purple_value_new(PURPLE_TYPE_STRING), /* Command */
- purple_value_new(PURPLE_TYPE_BOXED, "GHashTable *")); /* Parameters */
+ G_TYPE_BOOLEAN, 3,
+ G_TYPE_STRING, /* Protocol */
+ G_TYPE_STRING, /* Command */
+ G_TYPE_POINTER); /* Parameters (GHashTable *) */
- purple_signal_register(core, "quitting", purple_marshal_VOID, NULL, 0);
- purple_signal_register(core, "core-initialized", purple_marshal_VOID, NULL, 0);
+ purple_signal_register(core, "quitting", purple_marshal_VOID, G_TYPE_NONE,
+ 0);
+ purple_signal_register(core, "core-initialized", purple_marshal_VOID,
+ G_TYPE_NONE, 0);
/* The prefs subsystem needs to be initialized before static protocols
* for protocol prefs to work. */
diff --git a/libpurple/ft.c b/libpurple/ft.c
--- a/libpurple/ft.c
+++ b/libpurple/ft.c
@@ -1809,41 +1809,32 @@ purple_xfers_init(void) {
/* register signals */
purple_signal_register(handle, "file-recv-accept",
- purple_marshal_VOID__POINTER, NULL, 1,
- purple_value_new(PURPLE_TYPE_SUBTYPE,
- PURPLE_SUBTYPE_XFER));
+ purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
+ PURPLE_TYPE_XFER);
purple_signal_register(handle, "file-send-accept",
- purple_marshal_VOID__POINTER, NULL, 1,
- purple_value_new(PURPLE_TYPE_SUBTYPE,
- PURPLE_SUBTYPE_XFER));
+ purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
+ PURPLE_TYPE_XFER);
purple_signal_register(handle, "file-recv-start",
- purple_marshal_VOID__POINTER, NULL, 1,
- purple_value_new(PURPLE_TYPE_SUBTYPE,
- PURPLE_SUBTYPE_XFER));
+ purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
+ PURPLE_TYPE_XFER);
purple_signal_register(handle, "file-send-start",
- purple_marshal_VOID__POINTER, NULL, 1,
- purple_value_new(PURPLE_TYPE_SUBTYPE,
- PURPLE_SUBTYPE_XFER));
+ purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
+ PURPLE_TYPE_XFER);
purple_signal_register(handle, "file-send-cancel",
- purple_marshal_VOID__POINTER, NULL, 1,
- purple_value_new(PURPLE_TYPE_SUBTYPE,
- PURPLE_SUBTYPE_XFER));
+ purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
+ PURPLE_TYPE_XFER);
purple_signal_register(handle, "file-recv-cancel",
- purple_marshal_VOID__POINTER, NULL, 1,
- purple_value_new(PURPLE_TYPE_SUBTYPE,
- PURPLE_SUBTYPE_XFER));
+ purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
+ PURPLE_TYPE_XFER);
purple_signal_register(handle, "file-send-complete",
- purple_marshal_VOID__POINTER, NULL, 1,
- purple_value_new(PURPLE_TYPE_SUBTYPE,
- PURPLE_SUBTYPE_XFER));
+ purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
+ PURPLE_TYPE_XFER);
purple_signal_register(handle, "file-recv-complete",
- purple_marshal_VOID__POINTER, NULL, 1,
- purple_value_new(PURPLE_TYPE_SUBTYPE,
- PURPLE_SUBTYPE_XFER));
+ purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
+ PURPLE_TYPE_XFER);
purple_signal_register(handle, "file-recv-request",
- purple_marshal_VOID__POINTER, NULL, 1,
- purple_value_new(PURPLE_TYPE_SUBTYPE,
- PURPLE_SUBTYPE_XFER));
+ purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
+ PURPLE_TYPE_XFER);
}
void
diff --git a/libpurple/imgstore.c b/libpurple/imgstore.c
--- a/libpurple/imgstore.c
+++ b/libpurple/imgstore.c
@@ -214,10 +214,8 @@ purple_imgstore_init()
void *handle = purple_imgstore_get_handle();
purple_signal_register(handle, "image-deleting",
- purple_marshal_VOID__POINTER, NULL,
- 1,
- purple_value_new(PURPLE_TYPE_SUBTYPE,
- PURPLE_SUBTYPE_STORED_IMAGE));
+ purple_marshal_VOID__POINTER, G_TYPE_NONE,
+ 1, PURPLE_TYPE_STORED_IMAGE);
imgstore = g_hash_table_new(g_int_hash, g_int_equal);
}
More information about the Commits
mailing list