File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -375,6 +375,9 @@ extension Unsafe${Mutable}RawBufferPointer {
375
375
/// must be properly aligned for accessing `T`, and `source.count` must be a
376
376
/// multiple of `MemoryLayout<T>.stride`.
377
377
///
378
+ /// The memory referenced by `source` may overlap with the memory referenced
379
+ /// by this buffer.
380
+ ///
378
381
/// After calling `copyMemory(from:)`, the first `source.count` bytes of
379
382
/// memory referenced by this buffer are initialized to raw bytes. If the
380
383
/// memory is bound to type `T`, then it contains values of type `T`.
Original file line number Diff line number Diff line change @@ -966,14 +966,17 @@ public struct UnsafeMutableRawPointer: _Pointer {
966
966
/// must be properly aligned for accessing `T`, and `byteCount` must be a
967
967
/// multiple of `MemoryLayout<T>.stride`.
968
968
///
969
- /// After calling `copyMemory(from:byteCount:)`, the `byteCount` bytes of memory
970
- /// referenced by this pointer are initialized to raw bytes. If the memory
971
- /// is bound to type `T`, then it contains values of type `T`.
969
+ /// The memory in the region `source..<(source + byteCount)` may overlap with
970
+ /// the memory referenced by this pointer.
971
+ ///
972
+ /// After calling `copyMemory(from:byteCount:)`, the `byteCount` bytes of
973
+ /// memory referenced by this pointer are initialized to raw bytes. If the
974
+ /// memory is bound to type `T`, then it contains values of type `T`.
972
975
///
973
976
/// - Parameters:
974
977
/// - source: A pointer to the memory to copy bytes from. The memory in the
975
- /// region `source..<(source + byteCount)` must be initialized to a trivial
976
- /// type.
978
+ /// region `source..<(source + byteCount)` must be initialized to a
979
+ /// trivial type.
977
980
/// - byteCount: The number of bytes to copy. `byteCount` must not be negative.
978
981
@inlinable
979
982
public func copyMemory( from source: UnsafeRawPointer , byteCount: Int ) {
You can’t perform that action at this time.
0 commit comments