Skip to content

CG types are sendable #4874

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
Feb 21, 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: 1 addition & 1 deletion Sources/Foundation/CGFloat.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//

@frozen
public struct CGFloat {
public struct CGFloat: Sendable {
#if arch(i386) || arch(arm) || arch(wasm32)
/// The native type used to store the CGFloat, which is Float on
/// 32-bit architectures and Double on 64-bit architectures.
Expand Down
14 changes: 7 additions & 7 deletions Sources/Foundation/NSGeometry.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//

public struct CGPoint {
public struct CGPoint: Sendable {
public var x: CGFloat
public var y: CGFloat
public init() {
Expand Down Expand Up @@ -100,7 +100,7 @@ extension CGPoint : Codable {
}
}

public struct CGSize {
public struct CGSize: Sendable {
public var width: CGFloat
public var height: CGFloat
public init() {
Expand Down Expand Up @@ -193,7 +193,7 @@ extension CGSize : Codable {
}
}

public struct CGRect {
public struct CGRect: Sendable {
public var origin: CGPoint
public var size: CGSize
public init() {
Expand Down Expand Up @@ -501,15 +501,15 @@ extension CGRect: NSSpecialValueCoding {
}
}

public enum NSRectEdge : UInt {
public enum NSRectEdge : UInt, Sendable {

case minX
case minY
case maxX
case maxY
}

public enum CGRectEdge : UInt32 {
public enum CGRectEdge : UInt32, Sendable {

case minXEdge
case minYEdge
Expand All @@ -529,7 +529,7 @@ extension NSRectEdge {
}


public struct NSEdgeInsets {
public struct NSEdgeInsets: Sendable {
public var top: CGFloat
public var left: CGFloat
public var bottom: CGFloat
Expand Down Expand Up @@ -604,7 +604,7 @@ extension NSEdgeInsets: NSSpecialValueCoding {
}
}

public struct AlignmentOptions : OptionSet {
public struct AlignmentOptions : OptionSet, Sendable {
public var rawValue : UInt64
public init(rawValue: UInt64) { self.rawValue = rawValue }

Expand Down