-
Notifications
You must be signed in to change notification settings - Fork 673
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
Remove revents from PollFd::new #542
Conversation
@Susurrus can you explain this a tiny bit more? I am guessing that |
Ah yeah, that looks to be the case: struct pollfd {
int fd; /* file descriptor */
short events; /* requested events */
short revents; /* returned events */
}; @Susurrus could you add a tiny bit of context to the commit message, and add this to the Changed section in the changelog? |
@kamalmarhubi Exactly. I've updated the changelog and added context to the commit message. Is there any way I should denote this being a breaking change, either in the commit, changelog, or somewhere else? Since nix is pre-1.0, I don't think it matters much, but eventually breaking changes will need to be tracked for proper semver. |
Re breaking changes that's already got an issue #458, which doesn't seem to ascribe any specific action for breaking changes, so I'll assume there's nothing else I need to do and defer higher-level discussion to that issue. |
revents is an output field so regardless of what value it is set to it will be overwritten by many of the function calls that take a PollFd. The only value that makes sense for the caller to pass in in `EventFlags::empty()` so we just hardcode that instead of making the caller do it.
@kamalmarhubi Should be good to go now! |
@homu r+ |
📌 Commit 80453b9 has been approved by |
Remove revents from PollFd::new I could've used a `0i16`here as well but I liked the better semantics of `empty()`.
☀️ Test successful - status |
I could've used a
0i16
here as well but I liked the better semantics ofempty()
.