Skip to content

Commit f8f7d0c

Browse files
committed
Make _low and _high public
1 parent 839c49b commit f8f7d0c

File tree

2 files changed

+17
-25
lines changed

2 files changed

+17
-25
lines changed

stdlib/public/core/Int128.swift

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,19 @@ public struct Int128: Sendable {
3030

3131
@available(SwiftStdlib 6.0, *)
3232
@_transparent
33-
internal var _low: UInt64 {
33+
public var _low: UInt64 {
3434
UInt64(truncatingIfNeeded: self)
3535
}
3636

3737
@available(SwiftStdlib 6.0, *)
3838
@_transparent
39-
internal var _high: Int64 {
39+
public var _high: Int64 {
4040
Int64(truncatingIfNeeded: self &>> 64)
4141
}
4242

4343
@available(SwiftStdlib 6.0, *)
4444
@_transparent
45-
internal init(_low: UInt64, _high: Int64) {
45+
public init(_low: UInt64, _high: Int64) {
4646
#if _endian(little)
4747
self = unsafeBitCast((_low, _high), to: Int128.self)
4848
#else
@@ -57,22 +57,18 @@ public struct Int128: Sendable {
5757
// out the type as two `UInt64` fields--note that we have to be careful
5858
// about endianness in this case.
5959
#if _endian(little)
60-
@usableFromInline
61-
internal var _low: UInt64
60+
public var _low: UInt64
6261

63-
@usableFromInline
64-
internal var _high: Int64
62+
public var _high: Int64
6563
#else
66-
@usableFromInline
67-
internal var _high: Int64
64+
public var _high: Int64
6865

69-
@usableFromInline
70-
internal var _low: UInt64
66+
public var _low: UInt64
7167
#endif
7268

7369
@available(SwiftStdlib 6.0, *)
7470
@_transparent
75-
internal init(_low: UInt64, _high: Int64) {
71+
public init(_low: UInt64, _high: Int64) {
7672
self._low = _low
7773
self._high = _high
7874
}

stdlib/public/core/UInt128.swift

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,19 @@ public struct UInt128: Sendable {
3030

3131
@available(SwiftStdlib 6.0, *)
3232
@_transparent
33-
internal var _low: UInt64 {
33+
public var _low: UInt64 {
3434
UInt64(truncatingIfNeeded: self)
3535
}
3636

3737
@available(SwiftStdlib 6.0, *)
38-
@_transparent
39-
internal var _high: UInt64 {
38+
@_transparent @usableFromInline
39+
public var _high: UInt64 {
4040
UInt64(truncatingIfNeeded: self &>> 64)
4141
}
4242

4343
@available(SwiftStdlib 6.0, *)
4444
@_transparent
45-
internal init(_low: UInt64, _high: UInt64) {
45+
public init(_low: UInt64, _high: UInt64) {
4646
#if _endian(little)
4747
self = unsafeBitCast((_low, _high), to: Self.self)
4848
#else
@@ -57,21 +57,17 @@ public struct UInt128: Sendable {
5757
// out the type as two `UInt64` fields--note that we have to be careful
5858
// about endianness in this case.
5959
#if _endian(little)
60-
@usableFromInline
61-
internal var _low: UInt64
60+
public var _low: UInt64
6261

63-
@usableFromInline
64-
internal var _high: UInt64
62+
public var _high: UInt64
6563
#else
66-
@usableFromInline
67-
internal var _high: UInt64
64+
public var _high: UInt64
6865

69-
@usableFromInline
70-
internal var _low: UInt64
66+
public var _low: UInt64
7167
#endif
7268
@available(SwiftStdlib 6.0, *)
7369
@_transparent
74-
internal init(_low: UInt64, _high: UInt64) {
70+
public init(_low: UInt64, _high: UInt64) {
7571
self._low = _low
7672
self._high = _high
7773
}

0 commit comments

Comments
 (0)