Skip to content

Foundation: use numericCast in places for LLP64 #1833

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

Merged
merged 1 commit into from
Jan 23, 2019

Conversation

compnerd
Copy link
Member

LLP64 causes the Int type to be different on LLP64 hosts and LP64 as
Swift does not have intptr_t. This prepares for some of those changes
by using numericCast to hide the type checks.

LLP64 causes the `Int` type to be different on LLP64 hosts and LP64 as
Swift does not have `intptr_t`.  This prepares for some of those changes
by using `numericCast` to hide the type checks.
@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

CC: @millenomi @parkera @phausler

@millenomi
Copy link
Contributor

So, we talked at length about this. There are assumptions in the compiler that make Int 32-bit on Windows to facilitate C interop, and they're harder to reverse than just touching the few spots where C interop is using different types than on LP32/LP64. The Foundation interface will remain unaffected.

If Windows port maintenance is able to catch any leaking of Int that needs cast and propose patches (e.g. via CI), I'm okay pulling those in as things happen.

@millenomi millenomi merged commit 95906f2 into swiftlang:master Jan 23, 2019
@compnerd compnerd deleted the llp64 branch January 23, 2019 20:41
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