Skip to content

SIL: correct the definition of SwiftInt #40137

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
Nov 11, 2021
Merged

Conversation

compnerd
Copy link
Member

Int in Swift is defined to be intptr_t. long is equivalent, but
not portable as it relies on LP64 which is not guaranteed (Windows is
LLP64, not LP64). This corrects the definition to be more portable.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

`Int` in Swift is defined to be `intptr_t`.  `long` is equivalent, but
not portable as it relies on `LP64` which is not guaranteed (Windows is
LLP64, not LP64).  This corrects the definition to be more portable.
@compnerd
Copy link
Member Author

CC: @eeckstein

@compnerd
Copy link
Member Author

@swift-ci please test

Copy link
Contributor

@eeckstein eeckstein left a comment

Choose a reason for hiding this comment

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

thanks!

@CodaFi CodaFi merged commit 2c993d0 into swiftlang:main Nov 11, 2021
@compnerd compnerd deleted the ints-for-all branch November 11, 2021 23:57
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.

3 participants