fix: Correct type for conference offline peer numbers.#2704
Conversation
Also return count as uint32_t, not as peer number.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2704 +/- ##
==========================================
+ Coverage 73.05% 73.10% +0.04%
==========================================
Files 149 149
Lines 30517 30517
==========================================
+ Hits 22294 22309 +15
+ Misses 8223 8208 -15 ☔ View full report in Codecov by Sentry. |
| */ | ||
| Tox_Conference_Peer_Number tox_conference_peer_count( | ||
| uint32_t tox_conference_peer_count( | ||
| const Tox *tox, Tox_Conference_Number conference_number, Tox_Err_Conference_Peer_Query *error); |
There was a problem hiding this comment.
That's an interesting function. Thinking ahead, I wonder what would be the best way to change this to use opaque pointers in v0.3.0. Change it to return an array of Tox_Conference_Offline_Peer* opaque pointers? Or perhaps keep it as it is but add a helper function that uses this peer count as an index and returns an opaque Tox_Conference_Offline_Peer* to be used with other functions?
There was a problem hiding this comment.
Probably the latter, yes. Returning arrays of pointers makes things complicated and less safe (no bounds checks on C arrays).
Also return count as uint32_t, not as peer number.
This change is