use bool in is typing callback.

This commit is contained in:
irungentoo 2015-02-18 18:29:32 -05:00
parent 52a0753e52
commit 308cf5da6d
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98
2 changed files with 4 additions and 4 deletions

View File

@ -929,7 +929,7 @@ void m_callback_userstatus(Messenger *m, void (*function)(Messenger *m, uint32_t
m->friend_userstatuschange_userdata = userdata;
}
void m_callback_typingchange(Messenger *m, void(*function)(Messenger *m, uint32_t, uint8_t, void *), void *userdata)
void m_callback_typingchange(Messenger *m, void(*function)(Messenger *m, uint32_t, _Bool, void *), void *userdata)
{
m->friend_typingchange = function;
m->friend_typingchange_userdata = userdata;
@ -2043,7 +2043,7 @@ static int handle_packet(void *object, int i, uint8_t *temp, uint16_t len)
if (data_length != 1)
break;
uint8_t typing = data[0];
_Bool typing = !!data[0];
set_friend_typing(m, i, typing);

View File

@ -280,7 +280,7 @@ struct Messenger {
void *friend_statusmessagechange_userdata;
void (*friend_userstatuschange)(struct Messenger *m, uint32_t, uint8_t, void *);
void *friend_userstatuschange_userdata;
void (*friend_typingchange)(struct Messenger *m, uint32_t, uint8_t, void *);
void (*friend_typingchange)(struct Messenger *m, uint32_t, _Bool, void *);
void *friend_typingchange_userdata;
void (*read_receipt)(struct Messenger *m, uint32_t, uint32_t, void *);
void *read_receipt_userdata;
@ -664,7 +664,7 @@ void m_callback_userstatus(Messenger *m, void (*function)(Messenger *m, uint32_t
/* Set the callback for typing changes.
* Function(uint32_t friendnumber, uint8_t is_typing)
*/
void m_callback_typingchange(Messenger *m, void(*function)(Messenger *m, uint32_t, uint8_t, void *), void *userdata);
void m_callback_typingchange(Messenger *m, void(*function)(Messenger *m, uint32_t, _Bool, void *), void *userdata);
/* Set the callback for read receipts.
* Function(uint32_t friendnumber, uint32_t receipt)