Skip to content

Commit c0098f9

Browse files
committed
Merge remote-tracking branch 'origin/master' into master-rebranch
2 parents ae932e8 + 5f80f77 commit c0098f9

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

stdlib/public/core/UnsafeRawBufferPointer.swift.gyb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,9 @@ extension Unsafe${Mutable}RawBufferPointer {
375375
/// must be properly aligned for accessing `T`, and `source.count` must be a
376376
/// multiple of `MemoryLayout<T>.stride`.
377377
///
378+
/// The memory referenced by `source` may overlap with the memory referenced
379+
/// by this buffer.
380+
///
378381
/// After calling `copyMemory(from:)`, the first `source.count` bytes of
379382
/// memory referenced by this buffer are initialized to raw bytes. If the
380383
/// memory is bound to type `T`, then it contains values of type `T`.

stdlib/public/core/UnsafeRawPointer.swift

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -966,14 +966,17 @@ public struct UnsafeMutableRawPointer: _Pointer {
966966
/// must be properly aligned for accessing `T`, and `byteCount` must be a
967967
/// multiple of `MemoryLayout<T>.stride`.
968968
///
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`.
972975
///
973976
/// - Parameters:
974977
/// - 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.
977980
/// - byteCount: The number of bytes to copy. `byteCount` must not be negative.
978981
@inlinable
979982
public func copyMemory(from source: UnsafeRawPointer, byteCount: Int) {

0 commit comments

Comments
 (0)