Skip to content

Commit 9a3b073

Browse files
authored
Revert "[SE-0193] Rename the attributes to their final names"
1 parent 397eaed commit 9a3b073

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

Foundation/Boxing.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
///
1515
/// Note: This assumes that the result of calling copy() is mutable. The documentation says that classes which do not have a mutable/immutable distinction should just adopt NSCopying instead of NSMutableCopying.
1616
internal final class _MutableHandle<MutableType : NSObject> where MutableType : NSCopying {
17-
@usableFromInline internal var _pointer : MutableType
17+
@_versioned internal var _pointer : MutableType
1818

1919
init(reference : MutableType) {
2020
_pointer = reference.copy() as! MutableType

Foundation/Data.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -1005,8 +1005,8 @@ public struct Data : ReferenceConvertible, Equatable, Hashable, RandomAccessColl
10051005
// FIXME: switch back to Range once swift 5.0 branch has PR #13342
10061006
public typealias Indices = CountableRange<Int>
10071007

1008-
@usableFromInline internal var _backing : _DataStorage
1009-
@usableFromInline internal var _sliceRange: Range<Index>
1008+
@_versioned internal var _backing : _DataStorage
1009+
@_versioned internal var _sliceRange: Range<Index>
10101010

10111011

10121012
// A standard or custom deallocator for `Data`.
@@ -1257,18 +1257,18 @@ public struct Data : ReferenceConvertible, Equatable, Hashable, RandomAccessColl
12571257
}
12581258
}
12591259

1260-
@usableFromInline
1260+
@_versioned
12611261
internal init(backing: _DataStorage, range: Range<Index>) {
12621262
_backing = backing
12631263
_sliceRange = range
12641264
}
12651265

1266-
@usableFromInline
1266+
@_versioned
12671267
internal func _validateIndex(_ index: Int, message: String? = nil) {
12681268
precondition(_sliceRange.contains(index), message ?? "Index \(index) is out of bounds of range \(_sliceRange)")
12691269
}
12701270

1271-
@usableFromInline
1271+
@_versioned
12721272
internal func _validateRange<R: RangeExpression>(_ range: R) where R.Bound == Int {
12731273
let lower = R.Bound(_sliceRange.lowerBound)
12741274
let upper = R.Bound(_sliceRange.upperBound)

Foundation/IndexSet.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public struct IndexSet : ReferenceConvertible, Equatable, BidirectionalCollectio
150150
public typealias ReferenceType = NSIndexSet
151151
public typealias Element = Int
152152

153-
@usableFromInline
153+
@_versioned
154154
internal var _handle: _MutablePairHandle<NSIndexSet, NSMutableIndexSet>
155155

156156
/// Initialize an `IndexSet` with a range of integers.
@@ -846,7 +846,7 @@ internal enum _MutablePair<ImmutableType, MutableType> {
846846
/// a.k.a. Box
847847
internal final class _MutablePairHandle<ImmutableType : NSObject, MutableType : NSObject>
848848
where ImmutableType : NSMutableCopying, MutableType : NSMutableCopying {
849-
@usableFromInline
849+
@_versioned
850850
internal var _pointer: _MutablePair<ImmutableType, MutableType>
851851

852852
/// Initialize with an immutable reference instance.

Foundation/NSStringAPI.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,8 @@ extension StringProtocol where Index == String.Index {
435435

436436
// self can be a Substring so we need to subtract/add this offset when
437437
// passing _ns to the Foundation APIs. Will be 0 if self is String.
438-
@inlinable
439-
@usableFromInline
438+
@_inlineable
439+
@_versioned
440440
internal var _substringOffset: Int {
441441
return self.startIndex.encodedOffset
442442
}
@@ -447,8 +447,8 @@ extension StringProtocol where Index == String.Index {
447447
return Index(encodedOffset: utf16Index + _substringOffset)
448448
}
449449

450-
@inlinable
451-
@usableFromInline
450+
@_inlineable
451+
@_versioned
452452
internal func _toRelativeNSRange(_ r: Range<String.Index>) -> NSRange {
453453
return NSRange(
454454
location: r.lowerBound.encodedOffset - _substringOffset,

Foundation/NSSwiftRuntime.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,13 @@ internal func _CFZeroUnsafeIvars<T>(_ arg: inout T) {
140140
}
141141
}
142142

143-
@usableFromInline
143+
@_versioned
144144
@_cdecl("__CFSwiftGetBaseClass")
145145
internal func __CFSwiftGetBaseClass() -> UnsafeRawPointer {
146146
return unsafeBitCast(__NSCFType.self, to:UnsafeRawPointer.self)
147147
}
148148

149-
@usableFromInline
149+
@_versioned
150150
@_cdecl("__CFInitializeSwift")
151151
internal func __CFInitializeSwift() {
152152

0 commit comments

Comments
 (0)