[Pidgin] #2081: writing-{chat, im}-msg signals have incorrect marshallers
Pidgin
trac at pidgin.im
Mon Jul 9 13:05:12 EDT 2007
#2081: writing-{chat,im}-msg signals have incorrect marshallers
-----------------------+----------------------------------------------------
Reporter: resiak | Owner:
Type: defect | Status: new
Priority: minor | Milestone:
Component: libpurple | Version: 2.0.2
Keywords: | Pending: 0
-----------------------+----------------------------------------------------
According to the documentation, `writing-im-msg` has the signature:
{{{
gboolean (*writing_im_msg)(PurpleAccount *account, const char *who,
char **message, PurpleConversation *conv,
PurpleMessageFlags flags);
}}}
but it is registered as follows at `conversation.c:2066`:
{{{
purple_signal_register(handle, "writing-im-msg",
purple_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER_POINTER,
purple_value_new(PURPLE_TYPE_BOOLEAN), 5,
purple_value_new(PURPLE_TYPE_SUBTYPE,
PURPLE_SUBTYPE_ACCOUNT),
purple_value_new(PURPLE_TYPE_STRING),
purple_value_new_outgoing(PURPLE_TYPE_STRING),
purple_value_new(PURPLE_TYPE_SUBTYPE,
PURPLE_SUBTYPE_CONVERSATION),
purple_value_new(PURPLE_TYPE_UINT));
}}}
The final argument of the marshaller is `POINTER` rather than `UINT`.
This presumably breaks on any platform where a uint is not the same size
as a pointer (?).
nosnilmot remarked that the final argument is meant to be a pointer to the
flags so that they can be modified, and this is the case for
`receiving-*-msg`. So I guess the marshallers should be fixed for 2.x and
then the signals' signatures changed for 3.0?
--
Ticket URL: <http://developer.pidgin.im/ticket/2081>
Pidgin <http://pidgin.im>
Pidgin
More information about the Tracker
mailing list