-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
Automatically assume that win32_
and unix_
should use the related cfg
#1540
Automatically assume that win32_
and unix_
should use the related cfg
#1540
Conversation
c2aa3c8
to
e002b34
Compare
src/update_cfgs.rs
Outdated
None => Some("windows".to_string()), | ||
Some(cfg) => Some(format!("{cfg},windows")), | ||
} | ||
} else if sub_object_name.starts_with("Unix") { |
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.
Maybe also UNIX (all-uppercase)?
Generated code seems fine to me |
@GuillaumeGomez Are the are Windows/UNIX cfgs left in gtk-rs-core |
Yes. I only did it for gio iirc. |
e002b34
to
45a6bd2
Compare
Updated: it now takes into account the namespace the type comes from. Nothing to do for constants: their (non-c) name doesn't have a prefix apparently. |
I'll send PRs to other projects next. |
You can take a look at the result here (I didn't remove all unneeded
cfg_condition
yet).