# HG changeset patch # User Will Thompson # Date 1184242400 0 # Node ID f4d05584369ed80d99f72e14cc6af888d7390012 # Parent 64391b1e860ebc190ec26f1b85c6cbd1c053a93d Fix up writing-im-msg and writing-chat-msg to use a marshaller which treats the fifth argument as a guint (as is documented) rather than a pointer. See ticket #2081. diff -r 64391b1e860e -r f4d05584369e libpurple/conversation.c --- a/libpurple/conversation.c Thu Jul 12 04:34:02 2007 +0000 +++ b/libpurple/conversation.c Thu Jul 12 12:13:20 2007 +0000 @@ -2064,7 +2064,7 @@ * Register signals **********************************************************************/ purple_signal_register(handle, "writing-im-msg", - purple_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER_POINTER, + purple_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER_UINT, purple_value_new(PURPLE_TYPE_BOOLEAN), 5, purple_value_new(PURPLE_TYPE_SUBTYPE, PURPLE_SUBTYPE_ACCOUNT), @@ -2124,7 +2124,7 @@ purple_value_new(PURPLE_TYPE_UINT)); purple_signal_register(handle, "writing-chat-msg", - purple_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER_POINTER, + purple_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER_UINT, purple_value_new(PURPLE_TYPE_BOOLEAN), 5, purple_value_new(PURPLE_TYPE_SUBTYPE, PURPLE_SUBTYPE_ACCOUNT), diff -r 64391b1e860e -r f4d05584369e libpurple/signals.c --- a/libpurple/signals.c Thu Jul 12 04:34:02 2007 +0000 +++ b/libpurple/signals.c Thu Jul 12 12:13:20 2007 +0000 @@ -932,6 +932,25 @@ } void +purple_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER_UINT( + PurpleCallback cb, va_list args, void *data, void **return_val) +{ + gboolean ret_val; + void *arg1 = va_arg(args, void *); + void *arg2 = va_arg(args, void *); + void *arg3 = va_arg(args, void *); + void *arg4 = va_arg(args, void *); + guint arg5 = va_arg(args, guint); + + ret_val = + ((gboolean (*)(void *, void *, void *, void *, void *, guint))cb)( + arg1, arg2, arg3, arg4, arg5, data); + + if (return_val != NULL) + *return_val = GINT_TO_POINTER(ret_val); +} + +void purple_marshal_BOOLEAN__INT_POINTER(PurpleCallback cb, va_list args, void *data, void **return_val) { diff -r 64391b1e860e -r f4d05584369e libpurple/signals.h --- a/libpurple/signals.h Thu Jul 12 04:34:02 2007 +0000 +++ b/libpurple/signals.h Thu Jul 12 12:13:20 2007 +0000 @@ -323,6 +323,8 @@ PurpleCallback cb, va_list args, void *data, void **return_val); void purple_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER_POINTER( PurpleCallback cb, va_list args, void *data, void **return_val); +void purple_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER_UINT( + PurpleCallback cb, va_list args, void *data, void **return_val); void purple_marshal_BOOLEAN__INT_POINTER( PurpleCallback cb, va_list args, void *data, void **return_val);