Skip to content

[Stdlib] Mark CVaListPointer as @unsafe. #76371

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions stdlib/public/core/CTypes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ extension UInt {
/// A wrapper around a C `va_list` pointer.
#if arch(arm64) && !(os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(visionOS) || os(Windows))
@frozen
@unsafe
public struct CVaListPointer {
@usableFromInline // unsafe-performance
internal var _value: (__stack: UnsafeMutablePointer<Int>?,
Expand Down Expand Up @@ -317,6 +318,7 @@ extension CVaListPointer: CustomDebugStringConvertible {
#else

@frozen
@unsafe
public struct CVaListPointer {
@usableFromInline // unsafe-performance
internal var _value: UnsafeMutableRawPointer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ Func ContiguousArray.withUnsafeMutableBufferPointer(_:) is now without @rethrows
// Adoption of @unsafe
Func unsafeBitCast(_:to:) is now with @unsafe
Func unsafeDowncast(_:to:) is now with @unsafe
Struct CVaListPointer is now with @unsafe
Struct OpaquePointer is now with @unsafe
Struct Unmanaged is now with @unsafe
Struct UnsafeBufferPointer is now with @unsafe
Expand Down