-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert old groupchats to new API format #135
Conversation
f4fd693
to
abdd279
Compare
Reviewed 1 of 11 files at r2. auto_tests/tox_test.c, line 1178 at r2 (raw file):
This is now auto_tests/tox_test.c, line 1215 at r2 (raw file):
Not your change, but move all declarations except test_run and cur_time below this label. Then, don't initialise cur_time, and instead put the assignment as the labelled statement. Right now, cur_time stays the same, so retries get increasingly large numbers for time spent. auto_tests/tox_test.c, line 1286 at r2 (raw file):
s/num_peers/peer_count/g (and perhaps auto_tests/tox_test.c, line 1294 at r2 (raw file):
Can you add some more diagnostics here? Something like auto_tests/tox_test.c, line 1316 at r2 (raw file):
auto_tests/tox_test.c, line 1318 at r2 (raw file):
Perhaps move this up one line, so the check happens right after the call. other/apidsl/tox.in.h, line 2084 at r2 (raw file):
Capitalise "If". other/apidsl/tox.in.h, line 2132 at r2 (raw file):
I really don't like the "returns defined value on failure". I think users should not rely on that, and this guarantee shouldn't be part of the public API. Overloading the return value like that is unnecessary and makes it hard to formally reason about it, since now the theoretically valid range of conference numbers is not the range of the return type, but one less than that range. You now need to always keep that in mind when talking about conference (or friend) numbers. We can keep it like this for now, because the rest of the API also does that, but I hope we can remove that guarantee before 0.1. other/apidsl/tox.in.h, line 2179 at r2 (raw file):
I forgot an error here. This one can fail. other/apidsl/tox.in.h, line 2211 at r2 (raw file):
Remove "current" or replace with "passed" or something. The word "current" indicates that it's part of a state, while actually it's an argument and can be very temporary. other/apidsl/tox.in.h, line 2213 at r2 (raw file):
You can remove this line. It adds no information. other/apidsl/tox.in.h, line 2245 at r2 (raw file):
"the other/apidsl/tox.in.h, line 2272 at r2 (raw file):
Why would this fail? Is it the same as SENDQ in other error lists? other/apidsl/tox.in.h, line 2363 at r2 (raw file):
Capitalise "Title". other/apidsl/tox.in.h, line 2383 at r2 (raw file):
I don't think this is true. There is no other/apidsl/tox.in.h, line 2568 at r2 (raw file):
I'm not sure who added this newline, but I think we don't need it (there is only a single empty line at the start of class tox). Comments from Reviewable |
auto_tests/tox_test.c, line 1286 at r2 (raw file):
|
other/apidsl/tox.in.h, line 2383 at r2 (raw file):
|
other/apidsl/tox.in.h, line 2272 at r2 (raw file):
|
Review status: 1 of 12 files reviewed at latest revision, 16 unresolved discussions, some commit checks failed. auto_tests/tox_test.c, line 1286 at r2 (raw file):
|
auto_tests/tox_test.c, line 1286 at r2 (raw file):
|
abdd279
to
cff57b1
Compare
Review status: 1 of 12 files reviewed at latest revision, 15 unresolved discussions. auto_tests/tox_test.c, line 1178 at r2 (raw file):
|
734ea9e
to
a0318fd
Compare
Review status: 1 of 12 files reviewed at latest revision, 5 unresolved discussions. auto_tests/tox_test.c, line 1180 at r3 (raw file):
You may want to change the -1 to UINT32_MAX as well, even though we don't really want to rely on that. Doesn't really matter, though, since the conversion from -1 is well-defined. auto_tests/tox_test.c, line 1212 at r3 (raw file):
Ok, this is why I said "put the assignment as labelled statement", so you wouldn't need an empty labelled statement. Doesn't really matter though. toxcore/group.c, line 1350 at r3 (raw file):
max_length is gone toxcore/group.c, line 1935 at r3 (raw file):
Now success is when it was sent to 0 peers? Comments from Reviewable |
a0318fd
to
1f5c424
Compare
Review status: 10 of 12 files reviewed at latest revision, 12 unresolved discussions, some commit checks failed. auto_tests/tox_test.c, line 1289 at r6 (raw file):
size_t, and %zu instead of %lu below. See #140 for the decision. auto_tests/tox_test.c, line 1361 at r6 (raw file):
size_t testing/irc_syncbot.c, line 124 at r6 (raw file):
Move one line up. testing/nTox.c, line 1132 at r6 (raw file):
Same here (move up). Comments from Reviewable |
9f6346b
to
881cc94
Compare
Review status: 9 of 12 files reviewed at latest revision, 12 unresolved discussions, some commit checks failed. auto_tests/tox_test.c, line 1289 at r6 (raw file):
|
Review status: 9 of 12 files reviewed at latest revision, 10 unresolved discussions, some commit checks failed. Comments from Reviewable |
Reviewed 1 of 11 files at r1, 2 of 11 files at r2, 2 of 7 files at r3, 2 of 3 files at r4, 1 of 1 files at r5, 3 of 3 files at r7. Comments from Reviewable |
Review status: all files reviewed at latest revision, 10 unresolved discussions, some commit checks failed. Comments from Reviewable |
881cc94
to
cbe927e
Compare
Reviewed 6 of 6 files at r8. Comments from Reviewable |
Reviewed 1 of 3 files at r4, 2 of 6 files at r8. toxcore/group.c, line 815 at r8 (raw file):
Seems, it's never return 0 toxcore/group.c, line 832 at r8 (raw file):
Maybe use named const or comment, why it's 8? toxcore/group.c, line 1077 at r8 (raw file):
What about using early break? I.e. using negative condition and 2 lines after if closed bracket toxcore/group.c, line 1307 at r8 (raw file):
What the reason of moving this code? Check of this condition faster, than previous toxcore/group.c, line 1892 at r8 (raw file):
Same as above toxcore/group.h, line 199 at r8 (raw file):
Seems, it's never return 0 Comments from Reviewable |
Reviewed 1 of 11 files at r1, 2 of 11 files at r2, 2 of 3 files at r7, 4 of 6 files at r8. toxcore/group.c, line 858 at r8 (raw file):
What about use toxcore/tox.c, line 1251 at r8 (raw file):
Why not toxcore/tox.c, line 1260 at r8 (raw file):
Why you don't use toxcore/tox.c, line 1297 at r8 (raw file):
Return type is toxcore/tox.c, line 1470 at r8 (raw file):
toxcore/tox.c, line 1546 at r8 (raw file):
IIRC, enum can be unsigned (implementation-defined), so return -1 can be incorrect Comments from Reviewable |
cbe927e
to
054255e
Compare
Review status: all files reviewed at latest revision, 22 unresolved discussions, some commit checks failed. toxcore/group.c, line 815 at r8 (raw file):
|
Reviewed 2 of 2 files at r9. toxcore/group.c, line 832 at r8 (raw file):
|
054255e
to
8e43ca8
Compare
Reviewed 2 of 3 files at r7, 1 of 6 files at r8, 2 of 2 files at r9, 4 of 4 files at r10. Comments from Reviewable |
Review status: all files reviewed at latest revision, 7 unresolved discussions, all commit checks successful. toxcore/tox.c, line 1470 at r8 (raw file):
|
Group chat API changed here: [TokTok/c-toxcore#135](TokTok/c-toxcore#135)
This change is