mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[stdlib] Add "Mutable" to [Autoreleasing]UnsafePointer
UnsafePointer becomes UnsafeMutablePointer AutoreleasingUnsafePointer becomes AutoreleasingUnsafeMutablePointer Swift SVN r20316
This commit is contained in:
@@ -775,12 +775,13 @@ extension UTF16 {
|
||||
}
|
||||
|
||||
public static func copy<T: StringElementType, U: StringElementType>(
|
||||
source: UnsafePointer<T>, destination: UnsafePointer<U>, count: Int
|
||||
source: UnsafeMutablePointer<T>,
|
||||
destination: UnsafeMutablePointer<U>, count: Int
|
||||
) {
|
||||
if strideof(T.self) == strideof(U.self) {
|
||||
_memcpy(
|
||||
dest: UnsafePointer(destination),
|
||||
src: UnsafePointer(source),
|
||||
dest: UnsafeMutablePointer(destination),
|
||||
src: UnsafeMutablePointer(source),
|
||||
size: UInt(count) * UInt(strideof(U.self)))
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user