Skip to content

Commit 0fdf652

Browse files
committed
WIP: docs and cleanup
1 parent ef5f7f5 commit 0fdf652

14 files changed

+483
-829
lines changed

.swiftpm/xcode/xcshareddata/xcschemes/SystemPackage.xcscheme

Lines changed: 0 additions & 70 deletions
This file was deleted.

.swiftpm/xcode/xcshareddata/xcschemes/swift-system-Package.xcscheme

Lines changed: 0 additions & 131 deletions
This file was deleted.

.swiftpm/xcode/xcshareddata/xcschemes/system-samples.xcscheme

Lines changed: 0 additions & 119 deletions
This file was deleted.

Sources/System/Sockets/SocketAddress+Family.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,56 +18,56 @@ extension SocketAddress {
1818
public init(rawValue: CInterop.SAFamily) { self.rawValue = rawValue }
1919

2020
@_alwaysEmitIntoClient
21-
public init(_ rawValue: CInterop.SAFamily) { self.rawValue = rawValue }
21+
private init(_ rawValue: CInterop.SAFamily) { self.init(rawValue: rawValue) }
2222

2323
/// Unspecified address family.
2424
///
2525
/// The corresponding C constant is `AF_UNSPEC`.
2626
@_alwaysEmitIntoClient
27-
public static var unspecified: Family { Family(rawValue: _AF_UNSPEC) }
27+
public static var unspecified: Family { Family(_AF_UNSPEC) }
2828

2929
/// Local address family.
3030
///
3131
/// The corresponding C constant is `AF_LOCAL`.
3232
@_alwaysEmitIntoClient
33-
public static var local: Family { Family(rawValue: _AF_LOCAL) }
33+
public static var local: Family { Family(_AF_LOCAL) }
3434

3535
/// UNIX address family. (Renamed `local`.)
3636
///
3737
/// The corresponding C constant is `AF_UNIX`.
3838
@_alwaysEmitIntoClient
3939
@available(*, unavailable, renamed: "local")
40-
public static var unix: Family { Family(rawValue: _AF_UNIX) }
40+
public static var unix: Family { Family(_AF_UNIX) }
4141

4242
/// IPv4 address family.
4343
///
4444
/// The corresponding C constant is `AF_INET`.
4545
@_alwaysEmitIntoClient
46-
public static var ipv4: Family { Family(rawValue: _AF_INET) }
46+
public static var ipv4: Family { Family(_AF_INET) }
4747

4848
/// Internal routing address family.
4949
///
5050
/// The corresponding C constant is `AF_ROUTE`.
5151
@_alwaysEmitIntoClient
52-
public static var routing: Family { Family(rawValue: _AF_ROUTE) }
52+
public static var routing: Family { Family(_AF_ROUTE) }
5353

5454
/// IPv6 address family.
5555
///
5656
/// The corresponding C constant is `AF_INET6`.
5757
@_alwaysEmitIntoClient
58-
public static var ipv6: Family { Family(rawValue: _AF_INET6) }
58+
public static var ipv6: Family { Family(_AF_INET6) }
5959

6060
/// System address family.
6161
///
6262
/// The corresponding C constant is `AF_SYSTEM`.
6363
@_alwaysEmitIntoClient
64-
public static var system: Family { Family(rawValue: _AF_SYSTEM) }
64+
public static var system: Family { Family(_AF_SYSTEM) }
6565

6666
/// Raw network device address family.
6767
///
6868
/// The corresponding C constant is `AF_NDRV`
6969
@_alwaysEmitIntoClient
70-
public static var networkDevice: Family { Family(rawValue: _AF_NDRV) }
70+
public static var networkDevice: Family { Family(_AF_NDRV) }
7171
}
7272
}
7373

0 commit comments

Comments
 (0)