Skip to content

Commit a6f15ea

Browse files
committed
Make adjustments to mitigate the ABI break
1 parent 8bc9798 commit a6f15ea

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Sources/FoundationEssentials/Data/Data.swift

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2203,6 +2203,7 @@ public struct Data : Equatable, Hashable, RandomAccessCollection, MutableCollect
22032203
return try _representation.withUnsafeBytes(body)
22042204
}
22052205

2206+
@abi(var _aeic_bytes: RawSpan)
22062207
@available(macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2, *)
22072208
@_alwaysEmitIntoClient
22082209
public var bytes: RawSpan {
@@ -2231,6 +2232,12 @@ public struct Data : Equatable, Hashable, RandomAccessCollection, MutableCollect
22312232
}
22322233
}
22332234

2235+
@abi(var bytes: RawSpan)
2236+
@available(*, unavailable)
2237+
@usableFromInline
2238+
internal var _abi_compatibility_bytes: RawSpan { bytes }
2239+
2240+
@abi(var _aeic_span: Span<UInt8>)
22342241
@available(macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2, *)
22352242
@_alwaysEmitIntoClient
22362243
public var span: Span<UInt8> {
@@ -2241,6 +2248,12 @@ public struct Data : Equatable, Hashable, RandomAccessCollection, MutableCollect
22412248
}
22422249
}
22432250

2251+
@abi(var span: Span<UInt8>)
2252+
@available(*, unavailable)
2253+
@usableFromInline
2254+
internal var _abi_compatibility_span: Span<UInt8> { span }
2255+
2256+
@abi(var _aeic_mutableBytes: MutableRawSpan)
22442257
@available(macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2, *)
22452258
@_alwaysEmitIntoClient
22462259
public var mutableBytes: MutableRawSpan {
@@ -2269,6 +2282,12 @@ public struct Data : Equatable, Hashable, RandomAccessCollection, MutableCollect
22692282
}
22702283
}
22712284

2285+
@abi(var mutableBytes: MutableRawSpan)
2286+
@available(*, unavailable)
2287+
@usableFromInline
2288+
internal var _abi_compatibility_mutableBytes: MutableRawSpan { mutating get { mutableBytes } }
2289+
2290+
@abi(var _aeic_mutableSpan: MutableSpan<UInt8>)
22722291
@available(macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2, *)
22732292
@_alwaysEmitIntoClient
22742293
public var mutableSpan: MutableSpan<UInt8> {
@@ -2303,6 +2322,11 @@ public struct Data : Equatable, Hashable, RandomAccessCollection, MutableCollect
23032322
}
23042323
}
23052324

2325+
@abi(var mutableSpan: MutableSpan<UInt8>)
2326+
@available(*, unavailable)
2327+
@usableFromInline
2328+
internal var _abi_compatibility_mutableSpan: MutableSpan<UInt8> { mutating get { mutableSpan } }
2329+
23062330
@_alwaysEmitIntoClient
23072331
public func withContiguousStorageIfAvailable<ResultType>(_ body: (_ buffer: UnsafeBufferPointer<UInt8>) throws -> ResultType) rethrows -> ResultType? {
23082332
return try _representation.withUnsafeBytes {

0 commit comments

Comments
 (0)