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 pgp_packet_body_t to be more C++. #1350
Conversation
e7155fd
to
ae355b2
Compare
There are some CI timeout issues, but those seems to be caused by GHA, investigating them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest some minor corrections
/** @brief write packet header, length and body to the dst | ||
* @param dst destination to write to. | ||
**/ | ||
void write(pgp_dest_t &dst, bool hdr = true) noexcept; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hdr
parameter is not documented
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed.
src/librepgp/stream-packet.h
Outdated
* or mpi is ill-formed) | ||
**/ | ||
bool get(pgp_mpi_t &val) noexcept; | ||
/** @brief append chunk of the data to the packet body |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some phantom brief here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, thanks.
ae355b2
to
fabf966
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now)
It seems that the macOS test is never completing. I've restarted it a few hours ago...? |
Yeah, I also restarted it few times/tried on my fork. Looks like something is wrong with macOS runners, but still let's investigate it first. |
Looks like macOS 11 GHA works much faster - it finished in 20 minutes here: #1353 |
fabf966
to
85c11e8
Compare
Merging as we have two approvals and passing CI. |
This PR refactors pgp_packet_body_t and packet parsing/writing to be more C++, having cleaner code and destructor-based memory freeing.
It will be updated with the code borrowed from PR #1349 via new PRs once merged.