Mercurial > pidgin
changeset 18496:f4d05584369e
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.
author | Will Thompson <will.thompson@collabora.co.uk> |
---|---|
date | Thu, 12 Jul 2007 12:13:20 +0000 |
parents | 64391b1e860e |
children | b5982574dff5 |
files | libpurple/conversation.c libpurple/signals.c libpurple/signals.h |
diffstat | 3 files changed, 23 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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),
--- 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) {
--- 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);