Skip to content

Conversation

@compnerd
Copy link
Member

LLP64 environments use a 32-bit long value. This would result in
truncation as the long is used to transfer a pointer value here.
Adjust the types accordingly. Since the width on LP64 environments is
equivalent in this change, this should only impact LLP64 environments
and be ABI stable otherwise.

LLP64 environments use a 32-bit long value.  This would result in
truncation as the `long` is used to transfer a pointer value here.
Adjust the types accordingly.  Since the width on LP64 environments is
equivalent in this change, this should only impact LLP64 environments
and be ABI stable otherwise.
@compnerd
Copy link
Member Author

CC: @das @MadCoder

@compnerd
Copy link
Member Author

@swift-ci please test

*/
DISPATCH_SWIFT3_UNAVAILABLE("Use lazily initialized globals instead")
typedef long dispatch_once_t;
typedef intptr_t dispatch_once_t;
Copy link
Contributor

Choose a reason for hiding this comment

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

should really be uintptr_t I don't like signed integers for these.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, I only used intptr_t since it was long which is a signed value.

Copy link
Contributor

Choose a reason for hiding this comment

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

oh right and since it's API it may cause build fallouts... ok convinced let's keep intptr_t ugh

@MadCoder MadCoder merged commit 698220e into swiftlang:master Feb 22, 2018
@compnerd compnerd deleted the llp64 branch February 22, 2018 00:37
ktopley-apple pushed a commit that referenced this pull request Dec 6, 2018
dispatch: adjust for LLP64 environments

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
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