mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
implement SE 184: add allocation methods to Unsafe buffer pointers, drop all parameters from deallocation, adjust namings, and add repeated-value assignment methods
This commit is contained in:
committed by
Andrew Trick
parent
c7d33e70d3
commit
c85880899d
@@ -243,7 +243,7 @@ struct TestKeyPathBuilder {
|
||||
pushWord(args.count)
|
||||
pushWord(witnesses)
|
||||
|
||||
buffer.copyBytes(from: args)
|
||||
buffer.copyMemory(from: args)
|
||||
buffer = .init(start: buffer.baseAddress! + args.count,
|
||||
count: buffer.count - args.count)
|
||||
|
||||
@@ -952,7 +952,7 @@ func testCopy(from: UnsafeRawPointer,
|
||||
to: UnsafeMutableRawPointer,
|
||||
count: Int) {
|
||||
numberOfCopyOperations += 1
|
||||
to.copyBytes(from: from, count: count)
|
||||
to.copyMemory(from: from, byteCount: count)
|
||||
}
|
||||
|
||||
var numberOfEqualsOperations = 0
|
||||
|
||||
Reference in New Issue
Block a user