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

swift: remove Windows special case in Block.swift #599

Merged
merged 1 commit into from Oct 1, 2022

Conversation

compnerd
Copy link
Collaborator

DISPATCH_ENUM will use a typed enum which creates a typedef to an
elaborated type. This fails to be imported into Swift as a numeric
type. Explicitly convert the numericCast'ed value from the Swift
OptionSet to the dispatch_block_flags_t as a portable alternate
spelling. This allows us to continue to import the enum as a typed
value.

Thanks to @beccadax for the pointer that this pattern may not work on
Darwin (which it does not!) and the suggestion for the explicit type
conversion!

@compnerd
Copy link
Collaborator Author

@swift-ci please test

@compnerd
Copy link
Collaborator Author

CC: @rokhinip

@compnerd
Copy link
Collaborator Author

@swift-ci please test

@compnerd
Copy link
Collaborator Author

compnerd commented Jun 7, 2022

@swift-ci please test

@AtariDreams
Copy link
Contributor

Any updates on this @compnerd

@compnerd
Copy link
Collaborator Author

compnerd commented Oct 1, 2022

Thanks for the reminder!

@compnerd compnerd merged commit 469c8ec into apple:main Oct 1, 2022
@compnerd compnerd deleted the block-flags branch October 1, 2022 15:48
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.

None yet

3 participants