Skip to content

Import the new inline Data implementation and DataProtocol from the overlay #1813

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

Closed

Conversation

phausler
Copy link
Contributor

This brings Data in sync with the overlay changes for the new inline revamp.

@phausler
Copy link
Contributor Author

@swift-ci please test

}

public func lastRange<D: DataProtocol>(of data: D) -> Range<Index>? {
return self.firstRange(of: data, in: self.startIndex ..< self.endIndex)
Copy link
Contributor

@karwa karwa Dec 20, 2018

Choose a reason for hiding this comment

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

Should be lastRange.

See the 5.0 cherry-pick at swiftlang/swift#21292. We should sync that updated version to the overlay on master, 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.

yea we definitely shouldn't have master be different for Data and swift-5.0

count = range.upperBound
}
Swift.withUnsafeMutableBytes(of: &bytes) { rawBuffer in
bzero(rawBuffer.baseAddress?.advanced(by: range.lowerBound), range.upperBound - range.lowerBound)
Copy link
Contributor

Choose a reason for hiding this comment

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

Similarly, this was replaced with memset. bzero isn't portable.

…he swift version in the xcode projects and correct some failures in TestURL by updating to 4.2
@phausler
Copy link
Contributor Author

@swift-ci please test

1 similar comment
@millenomi
Copy link
Contributor

@swift-ci please test

@phausler
Copy link
Contributor Author

This is out of date and supplanted by the other merge I landed.

@phausler phausler closed this Jan 25, 2019
@phausler
Copy link
Contributor Author

#1834 was the one that landed

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