pidgin: cc383a4e: Restructure that patch a bit. The marsh...

rekkanoryo at pidgin.im rekkanoryo at pidgin.im
Sat Apr 16 15:30:47 EDT 2011


----------------------------------------------------------------------
Revision: cc383a4eb70377666f731757dcae709bf80aea37
Parent:   373dc479b854c8d458fc52ec78483ec5b9dfeec0
Author:   rekkanoryo at pidgin.im
Date:     04/16/11 15:27:08
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/cc383a4eb70377666f731757dcae709bf80aea37

Changelog: 

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.

Changes against parent 373dc479b854c8d458fc52ec78483ec5b9dfeec0

  patched  libpurple/signals.c
  patched  libpurple/signals.h
  patched  pidgin/gtkconv.c

-------------- next part --------------
============================================================
--- pidgin/gtkconv.c	46f55b8348aa70d6aa94df498ec72af6fd73ade0
+++ pidgin/gtkconv.c	4c13dce050cac7488a70ae9f1100f17afd256895
@@ -7842,20 +7842,6 @@ pidgin_conversations_get_handle(void)
 	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 @@ pidgin_conversations_init(void)
 										"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));
============================================================
--- libpurple/signals.c	8d02037a6c2156f4a5e1b9b385f6136523f937da
+++ libpurple/signals.c	b56be703d2009faf198e03c7eab378a5ccab5cf9
@@ -880,6 +880,20 @@ void
 }
 
 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)
 {
============================================================
--- libpurple/signals.h	4cb0cf1b95e0df574d71f483d56383fc0648ee95
+++ libpurple/signals.h	f2e4abc4cce9bd0cdb659f0bf88180aa1005723e
@@ -339,6 +339,8 @@ void purple_marshal_BOOLEAN__POINTER_POI
 		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(


More information about the Commits mailing list