Skip to content

Commit 3937cee

Browse files
committed
[Stdlib] Mark CVaListPointer as @unsafe.
rdar://135604375
1 parent ada0ceb commit 3937cee

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

stdlib/public/core/CTypes.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ extension UInt {
284284
/// A wrapper around a C `va_list` pointer.
285285
#if arch(arm64) && !(os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(visionOS) || os(Windows))
286286
@frozen
287+
@unsafe
287288
public struct CVaListPointer {
288289
@usableFromInline // unsafe-performance
289290
internal var _value: (__stack: UnsafeMutablePointer<Int>?,
@@ -317,6 +318,7 @@ extension CVaListPointer: CustomDebugStringConvertible {
317318
#else
318319

319320
@frozen
321+
@unsafe
320322
public struct CVaListPointer {
321323
@usableFromInline // unsafe-performance
322324
internal var _value: UnsafeMutableRawPointer

test/api-digester/Outputs/stability-stdlib-source-base.swift.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ Func ContiguousArray.withUnsafeMutableBufferPointer(_:) is now without @rethrows
364364
// Adoption of @unsafe
365365
Func unsafeBitCast(_:to:) is now with @unsafe
366366
Func unsafeDowncast(_:to:) is now with @unsafe
367+
Struct CVaListPointer is now with @unsafe
367368
Struct OpaquePointer is now with @unsafe
368369
Struct Unmanaged is now with @unsafe
369370
Struct UnsafeBufferPointer is now with @unsafe

0 commit comments

Comments
 (0)