mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
When typechecking the constraint inout $T1 < UnsafeMutablePointer<Void>, bind $T1 to Void as a last resort.
Revert stdlib changes in r25921. <rdar://problem/19835413> Reference to value from array changed Swift SVN r25939
This commit is contained in:
@@ -298,8 +298,8 @@ public func ==(lhs: String, rhs: String) -> Bool {
|
||||
return false
|
||||
}
|
||||
return memcmp(
|
||||
UnsafeMutablePointer<UTF8.CodeUnit>(lhs._core.startASCII),
|
||||
UnsafeMutablePointer<UTF8.CodeUnit>(rhs._core.startASCII),
|
||||
UnsafeMutablePointer(lhs._core.startASCII),
|
||||
UnsafeMutablePointer(rhs._core.startASCII),
|
||||
rhs._core.count) == 0
|
||||
}
|
||||
return lhs._compareString(rhs) == 0
|
||||
@@ -322,8 +322,8 @@ extension String {
|
||||
public // @testable
|
||||
func _compareASCII(rhs: String) -> Int {
|
||||
var compare = Int(memcmp(
|
||||
UnsafeMutablePointer<UTF8.CodeUnit>(self._core.startASCII),
|
||||
UnsafeMutablePointer<UTF8.CodeUnit>(rhs._core.startASCII),
|
||||
UnsafeMutablePointer(self._core.startASCII),
|
||||
UnsafeMutablePointer(rhs._core.startASCII),
|
||||
min(self._core.count, rhs._core.count)))
|
||||
if compare == 0 {
|
||||
compare = self._core.count - rhs._core.count
|
||||
|
||||
Reference in New Issue
Block a user