changeset 21217:0af37f1abb17

Add marshalling functions for the authorization signals.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Thu, 04 Oct 2007 04:02:33 +0000
parents b9d6cd4d9024
children 9faacf8aa044
files libpurple/signals.c libpurple/signals.h
diffstat 2 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/signals.c	Wed Oct 03 14:14:31 2007 +0000
+++ b/libpurple/signals.c	Thu Oct 04 04:02:33 2007 +0000
@@ -794,6 +794,19 @@
 		*return_val = GINT_TO_POINTER(ret_val);
 }
 
+void
+purple_marshal_INT__POINTER_POINTER(PurpleCallback cb, va_list args, void *data,
+                                      void **return_val)
+{
+	gint ret_val;
+	void *arg1 = va_arg(args, void *);
+	void *arg2 = va_arg(args, void *);
+
+	ret_val = ((gint (*)(void *, void *, void *))cb)(arg1, arg2, data);
+
+	if (return_val != NULL)
+		*return_val = GINT_TO_POINTER(ret_val);
+}
 
 void
 purple_marshal_INT__POINTER_POINTER_POINTER_POINTER_POINTER(
--- a/libpurple/signals.h	Wed Oct 03 14:14:31 2007 +0000
+++ b/libpurple/signals.h	Thu Oct 04 04:02:33 2007 +0000
@@ -307,6 +307,8 @@
 		PurpleCallback cb, va_list args, void *data, void **return_val);
 void purple_marshal_INT__INT_INT(
 		PurpleCallback cb, va_list args, void *data, void **return_val);
+void purple_marshal_INT__POINTER_POINTER(
+		PurpleCallback cb, va_list args, void *data, void **return_val);
 void purple_marshal_INT__POINTER_POINTER_POINTER_POINTER_POINTER(
 		PurpleCallback cb, va_list args, void *data, void **return_val);