From 2e48b31e47ab73919ddfbcd5512799affdbdedb8 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Thu, 20 Mar 2014 20:32:37 -0400 Subject: [PATCH] Fixed an api inconsistency. --- auto_tests/tox_test.c | 2 +- toxcore/Messenger.c | 2 +- toxcore/Messenger.h | 6 +++--- toxcore/tox.c | 4 ++-- toxcore/tox.h | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/auto_tests/tox_test.c b/auto_tests/tox_test.c index 1b93a0d2..1e01aee7 100644 --- a/auto_tests/tox_test.c +++ b/auto_tests/tox_test.c @@ -52,7 +52,7 @@ void print_nickchange(Tox *m, int friendnumber, uint8_t *string, uint16_t length uint32_t typing_changes; -void print_typingchange(Tox *m, int friendnumber, int typing, void *userdata) +void print_typingchange(Tox *m, int friendnumber, uint8_t typing, void *userdata) { if (*((uint32_t *)userdata) != 974536) return; diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index 738f0a2f..d0f460e9 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c @@ -772,7 +772,7 @@ void m_callback_userstatus(Messenger *m, void (*function)(Messenger *m, int32_t, m->friend_userstatuschange_userdata = userdata; } -void m_callback_typingchange(Messenger *m, void(*function)(Messenger *m, int32_t, int, void *), void *userdata) +void m_callback_typingchange(Messenger *m, void(*function)(Messenger *m, int32_t, uint8_t, void *), void *userdata) { m->friend_typingchange = function; m->friend_typingchange_userdata = userdata; diff --git a/toxcore/Messenger.h b/toxcore/Messenger.h index f9d723a5..110e3ac5 100644 --- a/toxcore/Messenger.h +++ b/toxcore/Messenger.h @@ -208,7 +208,7 @@ typedef struct Messenger { void *friend_statusmessagechange_userdata; void (*friend_userstatuschange)(struct Messenger *m, int32_t, uint8_t, void *); void *friend_userstatuschange_userdata; - void (*friend_typingchange)(struct Messenger *m, int32_t, int, void *); + void (*friend_typingchange)(struct Messenger *m, int32_t, uint8_t, void *); void *friend_typingchange_userdata; void (*read_receipt)(struct Messenger *m, int32_t, uint32_t, void *); void *read_receipt_userdata; @@ -478,9 +478,9 @@ void m_callback_statusmessage(Messenger *m, void (*function)(Messenger *m, int32 void m_callback_userstatus(Messenger *m, void (*function)(Messenger *m, int32_t, uint8_t, void *), void *userdata); /* Set the callback for typing changes. - * Function(int32_t friendnumber, int is_typing) + * Function(int32_t friendnumber, uint8_t is_typing) */ -void m_callback_typingchange(Messenger *m, void(*function)(Messenger *m, int32_t, int, void *), void *userdata); +void m_callback_typingchange(Messenger *m, void(*function)(Messenger *m, int32_t, uint8_t, void *), void *userdata); /* Set the callback for read receipts. * Function(int32_t friendnumber, uint32_t receipt) diff --git a/toxcore/tox.c b/toxcore/tox.c index a928f3f9..0c76182e 100644 --- a/toxcore/tox.c +++ b/toxcore/tox.c @@ -422,9 +422,9 @@ void tox_callback_user_status(Tox *tox, void (*function)(Messenger *tox, int32_t } /* Set the callback for typing changes. - * function (int32_t friendnumber, int is_typing) + * function (int32_t friendnumber, uint8_t is_typing) */ -void tox_callback_typing_change(Tox *tox, void (*function)(Messenger *tox, int32_t, int, void *), void *userdata) +void tox_callback_typing_change(Tox *tox, void (*function)(Messenger *tox, int32_t, uint8_t, void *), void *userdata) { Messenger *m = tox; m_callback_typingchange(m, function, userdata); diff --git a/toxcore/tox.h b/toxcore/tox.h index 8c9da84b..d40d7469 100644 --- a/toxcore/tox.h +++ b/toxcore/tox.h @@ -342,9 +342,9 @@ void tox_callback_status_message(Tox *tox, void (*function)(Tox *tox, int32_t, u void tox_callback_user_status(Tox *tox, void (*function)(Tox *tox, int32_t, uint8_t, void *), void *userdata); /* Set the callback for typing changes. - * function (Tox *tox, int32_t friendnumber, int is_typing, void *userdata) + * function (Tox *tox, int32_t friendnumber, uint8_t is_typing, void *userdata) */ -void tox_callback_typing_change(Tox *tox, void (*function)(Tox *tox, int32_t, int, void *), void *userdata); +void tox_callback_typing_change(Tox *tox, void (*function)(Tox *tox, int32_t, uint8_t, void *), void *userdata); /* Set the callback for read receipts. * function(Tox *tox, int32_t friendnumber, uint32_t receipt, void *userdata)