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

Clarify a comment #331

Merged
merged 1 commit into from
Oct 24, 2022
Merged

Clarify a comment #331

merged 1 commit into from
Oct 24, 2022

Conversation

zenhack
Copy link
Contributor

@zenhack zenhack commented Oct 24, 2022

Per #306, the call sites where this is unused struck me as suspicious -- but they are actually fine; sendCap already takes care of incrementing where necessary.

The return value only needed by sendReturn, so that it can arrange to release these when it receives a finish message with releaseParamCaps = true.

This patch clarifies the comment to make it clear that the caller is not responsible for actually applying the refcounts.

Per capnproto#306, the call sites where this is unused struck me as suspicious --
but they are actually fine; sendCap already takes care of incrementing
where necessary.

The return value only needed by sendReturn, so that it can arrange to
release these when it receives a finish message with releaseParamCaps =
true.

This patch clarifies the comment to make it clear that the caller is
not responsible for actually applying the refcounts.
@lthibault lthibault merged commit b1a48d7 into capnproto:main Oct 24, 2022
@zenhack zenhack deleted the clarify-comment branch October 24, 2022 18:00
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.

2 participants