Skip to content

Change the signature for DispatchData.enumerateBytes() to match that … #17982

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

Conversation

ktopley-apple
Copy link
Contributor

…of Data.enumerateBytes() for Swift 4.2 and obsolete the old version.

rdar://problem/40775762

Adds overload DispatchData.enumerateBytes(_:) to match the signature used in Data and make it available as of Swift 4.2. Also obsoletes the existing version.

Resolves SR-7868.

@ktopley-apple ktopley-apple requested review from jrose-apple and das July 16, 2018 20:22
@ktopley-apple
Copy link
Contributor Author

@swift-ci: please smoke test

@jrose-apple
Copy link
Contributor

The code looks good. I wonder if it's worth adding an explicit test that runs in 4.2 mode, so that you can check that the new signature is working too.

}
nextIndex = offset + ptr.count
})
#endif
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest a trailing closure test that's expected to work in both language modes, too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added that test and squashed commits.

…of Data.enumerateBytes() for Swift 4.2 and obsolete the old version.

rdar://problem/40775762
@ktopley-apple ktopley-apple force-pushed the ktopley-dispatch-rdar40775762 branch from 4d73bb6 to 7b0991f Compare July 17, 2018 18:01
@ktopley-apple
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - b57851f502ead8936809ac272dcd60c1fcae0d25

@ktopley-apple
Copy link
Contributor Author

@swift-ci please smoke test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - b57851f502ead8936809ac272dcd60c1fcae0d25

@jrose-apple
Copy link
Contributor

Note for next time: the regular tests include the smoke tests, so you don't actually have to run both.

@ktopley-apple ktopley-apple merged commit ccdcd94 into swiftlang:master Jul 18, 2018
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