Skip to content

Commit a0277e2

Browse files
committed
[stdlib] Fixing a buggy example in the comments in the file UnsafeRawPointer.swift
1 parent 939d51b commit a0277e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/core/UnsafeRawPointer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
/// offset by that number of bytes. The following example allocates four bytes
7979
/// of memory and stores `0xFF` in all four bytes:
8080
///
81-
/// let bytesPointer = UnsafeMutableRawPointer.allocate(byteCount: 4, alignment: 1)
81+
/// let bytesPointer = UnsafeMutableRawPointer.allocate(byteCount: 4, alignment: 4)
8282
/// bytesPointer.storeBytes(of: 0xFFFF_FFFF, as: UInt32.self)
8383
///
8484
/// // Load a value from the memory referenced by 'bytesPointer'

0 commit comments

Comments
 (0)