Skip to content

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

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

Conversation

ktopley-apple
Copy link
Contributor

@ktopley-apple ktopley-apple commented Jul 17, 2018

…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.

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

rdar://problem/40775762
@ktopley-apple
Copy link
Contributor Author

@swift-ci please test

@jrose-apple jrose-apple requested a review from tkremenek July 17, 2018 22:39
@ktopley-apple
Copy link
Contributor Author

This is a cherry-pick of the change in #17982 on swift master back to swift-4.2-branch.

@ktopley-apple
Copy link
Contributor Author

ktopley-apple commented Jul 18, 2018

@swift-ci please nominate

Explanation: adds a new variant of DispatchData.enumerateBytes() for Swift 4.2 that matches the method in Data so that a single protocol can be used to manipulate objects of both types. The existing method is deprecated.
Scope: change to the API of DIspatchData
Radar/SR reference: rdar://problem/40775762, https://bugs.swift.org/browse/SR-7868.
Risk: Low. Code that uses the existing method will continue to work; on rebuild, Xcode should offer a fix-up for the obsolete method.
Testing: Tests have been added to verify that the correct version of the method is visible in Swift 4.2 and before, and to check that invocations that uses of the trailing block syntax are unaffected.

@najacque najacque merged commit 58384d4 into swiftlang:swift-4.2-branch 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.

3 participants