-
Notifications
You must be signed in to change notification settings - Fork 1k
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
update epoll constants to match epoll_event struct #3466
Conversation
Change the type of the EPOLL* event constants to match the type of the events field in struct epoll_event (i.e. u32). closes: rust-lang#3462
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @JohnTitor (or someone else) soon. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
This should probably be considered a breaking change, but I'm unsure how to address that properly. I don't think deprecating the current constants and introducing new ones to reflect the type change is in any way a proper solution. Anyone using these constants in the context of epoll_event will already have these values wrapped as |
Could be it or creating a type alias from it __poll_t (especially, as you mentioned, it s tagged with bitwise attribute). |
I guess that depends on whether we want kernel types to be exposed directly through the libc crate. For as far as I can see, the
What would be the rust equivalent of the bitwise attribute? |
you re right then u32 seems good enough as is. |
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.
Seems safe enough, and it is unlikely existing code will break, it may get warnings though which will be easy to fix.
@bors r+ |
☀️ Test successful - checks-actions, checks-cirrus-freebsd-13, checks-cirrus-freebsd-14 |
Change the type of the EPOLL* event constants to match the type of the events field in struct epoll_event (i.e. u32).
closes: #3462