Skip to content
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

refactor: Add common msgpack array packer with callback. #2577

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

iphydf
Copy link
Member

@iphydf iphydf commented Jan 16, 2024

There will be more object arrays that need to be packed. This function
takes care of NULL (creating an empty array), and putting the correct
array size and calling the per-element callback the right amount of
times.


This change is Reviewable

@iphydf iphydf added this to the v0.2.19 milestone Jan 16, 2024
@iphydf iphydf marked this pull request as ready for review January 16, 2024 23:14
Copy link

codecov bot commented Jan 16, 2024

Codecov Report

Attention: 36 lines in your changes are missing coverage. Please review.

Comparison is base (3c659f5) 66.85% compared to head (bdd42b5) 66.80%.

Files Patch % Lines
toxcore/tox_event.c 66.00% 17 Missing ⚠️
toxcore/bin_pack.c 77.77% 2 Missing ⚠️
toxcore/events/group_custom_packet.c 0.00% 1 Missing ⚠️
toxcore/events/group_custom_private_packet.c 0.00% 1 Missing ⚠️
toxcore/events/group_invite.c 0.00% 1 Missing ⚠️
toxcore/events/group_join_fail.c 0.00% 1 Missing ⚠️
toxcore/events/group_message.c 0.00% 1 Missing ⚠️
toxcore/events/group_moderation.c 0.00% 1 Missing ⚠️
toxcore/events/group_password.c 0.00% 1 Missing ⚠️
toxcore/events/group_peer_join.c 0.00% 1 Missing ⚠️
... and 9 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2577      +/-   ##
==========================================
- Coverage   66.85%   66.80%   -0.05%     
==========================================
  Files         148      148              
  Lines       30330    30376      +46     
==========================================
+ Hits        20276    20294      +18     
- Misses      10054    10082      +28     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@iphydf iphydf force-pushed the obj-array branch 5 times, most recently from bb4f824 to ee8615b Compare January 17, 2024 18:35
Copy link
Member

@Green-Sky Green-Sky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update friend_request event, then this looks good to merge.

There will be more object arrays that need to be packed. This function
takes care of NULL (creating an empty array), and putting the correct
array size and calling the per-element callback the right amount of
times.
Copy link
Member

@JFreegman JFreegman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 42 of 44 files at r1, 3 of 3 files at r2, all commit messages.
Reviewable status: :shipit: complete! 1 of 1 approvals obtained

@iphydf iphydf merged commit bdd42b5 into TokTok:master Jan 18, 2024
55 of 56 checks passed
@iphydf iphydf deleted the obj-array branch January 18, 2024 16:40
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants