diff options
Diffstat (limited to 'toxcore')
-rw-r--r-- | toxcore/tox.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/toxcore/tox.c b/toxcore/tox.c index bdef1eaa..0115e827 100644 --- a/toxcore/tox.c +++ b/toxcore/tox.c | |||
@@ -385,23 +385,19 @@ void tox_callback_status_message(Tox *tox, void (*function)(Messenger *tox, int, | |||
385 | /* Set the callback for status type changes. | 385 | /* Set the callback for status type changes. |
386 | * function(int friendnumber, USERSTATUS kind) | 386 | * function(int friendnumber, USERSTATUS kind) |
387 | */ | 387 | */ |
388 | void tox_callback_user_status(Tox *tox, void (*_function)(Tox *tox, int, TOX_USERSTATUS, void *), void *userdata) | 388 | void tox_callback_user_status(Tox *tox, void (*function)(Messenger *tox, int, TOX_USERSTATUS, void *), void *userdata) |
389 | { | 389 | { |
390 | Messenger *m = tox; | 390 | Messenger *m = tox; |
391 | typedef void (*function_type)(Messenger *, int, USERSTATUS, void *); | ||
392 | function_type function = (function_type)_function; | ||
393 | m_callback_userstatus(m, function, userdata); | 391 | m_callback_userstatus(m, function, userdata); |
394 | } | 392 | } |
395 | 393 | ||
396 | /* Set the callback for typing changes. | 394 | /* Set the callback for typing changes. |
397 | * function (int friendnumber, int is_typing) | 395 | * function (int friendnumber, int is_typing) |
398 | */ | 396 | */ |
399 | void tox_callback_typing_change(Tox *tox, void (*function)(Tox *tox, int, int, void *), void *userdata) | 397 | void tox_callback_typing_change(Tox *tox, void (*function)(Messenger *tox, int, int, void *), void *userdata) |
400 | { | 398 | { |
401 | Messenger *m = tox; | 399 | Messenger *m = tox; |
402 | typedef void (*function_type)(Messenger *, int, int, void *); | 400 | m_callback_typingchange(m, function, userdata); |
403 | function_type function_new = (function_type)function; | ||
404 | m_callback_typingchange(m, function_new, userdata); | ||
405 | } | 401 | } |
406 | 402 | ||
407 | /* Set the callback for read receipts. | 403 | /* Set the callback for read receipts. |