Skip to content

Commit d1f7140

Browse files
committed
[stdlib] apply the legacy ABI pattern to 3 functions
1 parent 8a77cba commit d1f7140

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

stdlib/public/core/Array.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,9 +1601,9 @@ extension Array {
16011601

16021602
// Superseded by the typed-throws version of this function, but retained
16031603
// for ABI reasons.
1604+
@_spi(SwiftStdlibLegacyABI) @available(swift, obsoleted: 1)
16041605
@usableFromInline
1605-
@_disfavoredOverload
1606-
func withUnsafeBufferPointer<R>(
1606+
internal func withUnsafeBufferPointer<R>(
16071607
_ body: (UnsafeBufferPointer<Element>) throws -> R
16081608
) rethrows -> R {
16091609
return try unsafe _buffer.withUnsafeBufferPointer(body)

stdlib/public/core/ArraySlice.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,9 +1176,9 @@ extension ArraySlice {
11761176
extension ArraySlice {
11771177
// Superseded by the typed-throws version of this function, but retained
11781178
// for ABI reasons.
1179+
@_spi(SwiftStdlibLegacyABI) @available(swift, obsoleted: 1)
11791180
@usableFromInline
1180-
@_disfavoredOverload
1181-
func withUnsafeBufferPointer<R>(
1181+
internal func withUnsafeBufferPointer<R>(
11821182
_ body: (UnsafeBufferPointer<Element>) throws -> R
11831183
) rethrows -> R {
11841184
return try unsafe _buffer.withUnsafeBufferPointer(body)

stdlib/public/core/ContiguousArray.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,9 +1118,9 @@ extension ContiguousArray {
11181118

11191119
// Superseded by the typed-throws version of this function, but retained
11201120
// for ABI reasons.
1121+
@_spi(SwiftStdlibLegacyABI) @available(swift, obsoleted: 1)
11211122
@usableFromInline
1122-
@_disfavoredOverload
1123-
func withUnsafeBufferPointer<R>(
1123+
internal func withUnsafeBufferPointer<R>(
11241124
_ body: (UnsafeBufferPointer<Element>) throws -> R
11251125
) rethrows -> R {
11261126
return try unsafe _buffer.withUnsafeBufferPointer(body)

test/api-digester/stability-stdlib-abi-without-asserts.test

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -824,6 +824,9 @@ Func _SliceBuffer.withUnsafeMutableBufferPointer(_:) has mangled name changing f
824824

825825
// Functions changed for typed throws
826826
Constructor Array.init(_unsafeUninitializedCapacity:initializingWith:) has been removed
827+
Func Array.withUnsafeBufferPointer(_:) has been removed
828+
Func ArraySlice.withUnsafeBufferPointer(_:) has been removed
829+
Func ContiguousArray.withUnsafeBufferPointer(_:) has been removed
827830

828831
Struct String.Index has added a conformance to an existing protocol CustomDebugStringConvertible
829832

0 commit comments

Comments
 (0)