changeset 31921:0e7c5fe661e5

Restructure that patch a bit. The marshal function should have been with all the others, even if it's only used in Pidgin. It may be useful for other API in the future. Refs #12599.
author John Bailey <rekkanoryo@rekkanoryo.org>
date Sat, 16 Apr 2011 19:27:08 +0000
parents 32a00b76ce49
children 6c9ff026927f
files libpurple/signals.c libpurple/signals.h pidgin/gtkconv.c
diffstat 3 files changed, 17 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/signals.c	Sat Apr 16 18:56:17 2011 +0000
+++ b/libpurple/signals.c	Sat Apr 16 19:27:08 2011 +0000
@@ -880,6 +880,20 @@
 }
 
 void
+purple_marshal_BOOLEAN__POINTER_BOOLEAN(PurpleCallback cb, va_list args,
+									  void *data, void **return_val)
+{
+	gboolean ret_val;
+	void *arg1 = va_arg(args, void *);
+	gboolean arg2 = va_arg(args, gboolean);
+
+	ret_val = ((gboolean (*)(void *, gboolean, void *))cb)(arg1, arg2, data);
+
+	if (return_val != NULL)
+		*return_val = GINT_TO_POINTER(ret_val);
+}
+
+void
 purple_marshal_BOOLEAN__POINTER_POINTER_POINTER(PurpleCallback cb, va_list args,
 											  void *data, void **return_val)
 {
--- a/libpurple/signals.h	Sat Apr 16 18:56:17 2011 +0000
+++ b/libpurple/signals.h	Sat Apr 16 19:27:08 2011 +0000
@@ -339,6 +339,8 @@
 		PurpleCallback cb, va_list args, void *data, void **return_val);
 void purple_marshal_BOOLEAN__POINTER_POINTER(
 		PurpleCallback cb, va_list args, void *data, void **return_val);
+void purple_marshal_BOOLEAN__POINTER_BOOLEAN(
+		PurpleCallback cb, va_list args, void *data, void **return_val);
 void purple_marshal_BOOLEAN__POINTER_POINTER_POINTER(
 		PurpleCallback cb, va_list args, void *data, void **return_val);
 void purple_marshal_BOOLEAN__POINTER_POINTER_UINT(
--- a/pidgin/gtkconv.c	Sat Apr 16 18:56:17 2011 +0000
+++ b/pidgin/gtkconv.c	Sat Apr 16 19:27:08 2011 +0000
@@ -7842,20 +7842,6 @@
 	return &handle;
 }
 
-static void
-pidgin_marshal_BOOLEAN__POINTER_BOOLEAN(PurpleCallback cb, va_list args,
-									  void *data, void **return_val)
-{
-	gboolean ret_val;
-	void *arg1 = va_arg(args, void *);
-	gboolean arg2 = va_arg(args, gboolean);
-
-	ret_val = ((gboolean (*)(void *, gboolean, void *))cb)(arg1, arg2, data);
-
-	if (return_val != NULL)
-		*return_val = GINT_TO_POINTER(ret_val);
-}
-
 void
 pidgin_conversations_init(void)
 {
@@ -8043,7 +8029,7 @@
 										"PidginConversation *"));
 
 	purple_signal_register(handle, "chat-nick-autocomplete",
-						 pidgin_marshal_BOOLEAN__POINTER_BOOLEAN,
+						 purple_marshal_BOOLEAN__POINTER_BOOLEAN,
 						 purple_value_new(PURPLE_TYPE_BOOLEAN), 1,
 						 purple_value_new(PURPLE_TYPE_SUBTYPE,
 							 			PURPLE_SUBTYPE_CONVERSATION));