Skip to content

Conversation

compnerd
Copy link
Member

Adjust the block type to use intptr_t which is a register-wide integral type.
This allows the same declaration to be portable across LP64 and LLP64
environents.

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

Resolves SR-NNNN.

Adjust the block type to use `intptr_t` which is a register-wide integral type.
This allows the same declaration to be portable across LP64 and LLP64
environents.
@compnerd
Copy link
Member Author

@compnerd
Copy link
Member Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 1e89bf0

@compnerd
Copy link
Member Author

@swift-ci please test macOS platform

@jrose-apple
Copy link
Contributor

Seems reasonable to me, although ssize_t would probably be the most appropriate (since the underlying dispatch_apply uses size_t).

@gottesmm
Copy link
Contributor

Whoah its a wild @jrose-apple! Welcome back!

@compnerd
Copy link
Member Author

@jrose-apple - yeah, I can see an argument for that. The reason for me using intptr_t is because this allows us to match the "new" signatures in libdispatch itself. intptr_t is most closely related to the type that they want: something that is pointer width. This means that the type is going to be correct across I64LP32 variants.

@compnerd compnerd merged commit cc85197 into swiftlang:master Oct 23, 2018
@compnerd compnerd deleted the dispatch-shims-llp64 branch October 23, 2018 16:29
@jrose-apple
Copy link
Contributor

Fair enough; the whole point of the trampoline is to get back to Swift.Int.

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.

4 participants