|
1 | 1 | /* SPDX-License-Identifier: GPL-3.0-or-later |
2 | | - * Copyright © 2016-2018 The TokTok team. |
| 2 | + * Copyright © 2016-2024 The TokTok team. |
3 | 3 | * Copyright © 2013 Tox project. |
4 | 4 | */ |
5 | 5 |
|
|
52 | 52 | * event listeners, it needs to implement the dispatch functionality itself. |
53 | 53 | * |
54 | 54 | * The last argument to a callback is the user data pointer. It is passed from |
55 | | - * tox_iterate to each callback in sequence. |
56 | | - * |
57 | | - * The user data pointer is never stored or dereferenced by any library code, so |
58 | | - * can be any pointer, including NULL. Callbacks must all operate on the same |
59 | | - * object type. In the apidsl code (tox.in.h), this is denoted with `any`. The |
60 | | - * `any` in tox_iterate must be the same `any` as in all callbacks. In C, |
61 | | - * lacking parametric polymorphism, this is a pointer to void. |
62 | | - * |
63 | | - * Old style callbacks that are registered together with a user data pointer |
64 | | - * receive that pointer as argument when they are called. They can each have |
65 | | - * their own user data pointer of their own type. |
| 55 | + * tox_iterate to each callback in sequence. The user data pointer is never |
| 56 | + * stored or dereferenced by any library code, so can be any pointer, including |
| 57 | + * NULL. |
66 | 58 | * |
67 | 59 | * @section threading Threading implications |
68 | 60 | * |
@@ -1071,8 +1063,10 @@ void tox_callback_self_connection_status(Tox *tox, tox_self_connection_status_cb |
1071 | 1063 | uint32_t tox_iteration_interval(const Tox *tox); |
1072 | 1064 |
|
1073 | 1065 | /** |
1074 | | - * @brief The main loop that needs to be run in intervals of `tox_iteration_interval()` |
1075 | | - * milliseconds. |
| 1066 | + * @brief The main loop that needs to be run in intervals of |
| 1067 | + * `tox_iteration_interval()` milliseconds. |
| 1068 | + * @param user_data Any pointer a client wishes the Tox instance to pass into |
| 1069 | + * the event callbacks, including NULL. |
1076 | 1070 | */ |
1077 | 1071 | void tox_iterate(Tox *tox, void *user_data); |
1078 | 1072 |
|
|
0 commit comments