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

NIOCore: replace mode_t with CInt #2132

Merged
merged 3 commits into from
May 31, 2022
Merged

NIOCore: replace mode_t with CInt #2132

merged 3 commits into from
May 31, 2022

Conversation

compnerd
Copy link
Contributor

Windows does not have a mode_t type alias, instead using the
de-sugared CInt type. De-sugar the instances to permit building on
Windows.

Copy link
Contributor

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the CI failure indicates, mode_t is not necessarily a CInt. While we can change the way we hold the value internally, we can't change how we hold it in public API. Can we add a typealias that is defined differently (and appropriately) for Windows?

@compnerd
Copy link
Contributor Author

Sure a type alias would work. Any thoughts on a name?

Windows does not have a `mode_t` type alias, instead using the
de-sugared `CInt` type.  De-sugar the instances to permit building on
Windows.
Copy link
Contributor

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit and then we're good.

Sources/NIOCore/FileHandle.swift Outdated Show resolved Hide resolved
Co-authored-by: Cory Benfield <lukasa@apple.com>
@Lukasa Lukasa added the patch-version-bump-only For PRs that when merged will only cause a bump of the patch version, ie. 1.0.x -> 1.0.(x+1) label May 31, 2022
@Lukasa Lukasa enabled auto-merge (squash) May 31, 2022 17:01
@Lukasa Lukasa added 🔼 needs-minor-version-bump For PRs that when merged cause a bump of the minor version, ie. 1.x.0 -> 1.(x+1).0 and removed patch-version-bump-only For PRs that when merged will only cause a bump of the patch version, ie. 1.0.x -> 1.0.(x+1) labels May 31, 2022
@Lukasa Lukasa merged commit 15aaf88 into apple:main May 31, 2022
@compnerd compnerd deleted the mode_t branch May 31, 2022 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔼 needs-minor-version-bump For PRs that when merged cause a bump of the minor version, ie. 1.x.0 -> 1.(x+1).0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants