-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Bring Data in SCLF into sync with the version in the overlay #1494
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
@swift-ci please test |
CC: @phausler |
Typo in commit message (alining -> aligning) if you can amend the commit message. |
Foundation/Data.swift
Outdated
@@ -1553,7 +1558,7 @@ public struct Data : ReferenceConvertible, Equatable, Hashable, RandomAccessColl | |||
/// - parameter buffer: The replacement bytes. | |||
@inline(__always) | |||
public mutating func replaceSubrange<SourceType>(_ subrange: Range<Index>, with buffer: UnsafeBufferPointer<SourceType>) { | |||
guard !buffer.isEmpty else { return } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don’t revert the changes in #1485.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@saiHemak what happened here? I thought you were taking the latest version of Data from the overlay?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's possible we need to do a bidirectional merge here.
@ianpartridge I corrected it .. |
@swift-ci please test |
Foundation/Data.swift
Outdated
@@ -1003,7 +1008,7 @@ public struct Data : ReferenceConvertible, Equatable, Hashable, RandomAccessColl | |||
|
|||
public typealias Index = Int | |||
// FIXME: switch back to Range once swift 5.0 branch has PR #13342 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this could/should be removed as well.
e02fb53
to
d3443d5
Compare
@swift-ci please test |
cc @phausler |
@saiHemak this is just copied from the overlay, no additional changes? |
@parkera Yeah ,I have not done any additional changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've identified one area that's not correct, there may be others too.
Also, there is a new commit swiftlang/swift@302d827 that needs incorporating.
Foundation/Data.swift
Outdated
@@ -1474,7 +1478,7 @@ public struct Data : ReferenceConvertible, Equatable, Hashable, RandomAccessColl | |||
/// - parameter buffer: The buffer of bytes to append. The size is calculated from `SourceType` and `buffer.count`. | |||
@inline(__always) | |||
public mutating func append<SourceType>(_ buffer : UnsafeBufferPointer<SourceType>) { | |||
if buffer.isEmpty { return } | |||
if buffer.count == 0 { return } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's because swiftlang/swift#15674 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:) ..Yeah anyway rebasing based on latest master
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example, on line 41 there is a __NSDataIsCompact()
function that has been removed from the overlay. It needs removing here too.
The overlay should be treated as the "master" version as that currently gets more frequent bugfixes.
Looks, @ianpartridge ikesyo's changes were brought in to Swift Overlay recently. Initially the overlay had count changes .Hence ,initially when the PR was raised the latest master of Overlay had Count changes which caused the confusion. |
@ianpartridge a day ago some more changes were added to Data.swift am picking up those too .. |
@swift-ci please test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now - thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
No description provided.