Skip to content

Commit 550fbfd

Browse files
committed
SE-0125: Remove NonObjectiveCBase and isUniquelyReferenced
1 parent 80f1052 commit 550fbfd

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Diff for: Foundation/Boxing.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ extension _MutableBoxing {
5252
@inline(__always)
5353
mutating func _applyMutation<ReturnType>(_ whatToDo : @noescape(ReferenceType) -> ReturnType) -> ReturnType {
5454
// Only create a new box if we are not uniquely referenced
55-
if !isUniquelyReferencedNonObjC(&_handle) {
55+
if !isKnownUniquelyReferenced(&_handle) {
5656
let ref = _handle._pointer
5757
_handle = _MutableHandle(reference: ref)
5858
}
@@ -185,7 +185,7 @@ extension _MutablePairBoxing {
185185
case .Immutable(_):
186186
break
187187
case .Mutable(_):
188-
unique = isUniquelyReferencedNonObjC(&_wrapped)
188+
unique = isKnownUniquelyReferenced(&_wrapped)
189189
}
190190

191191
switch (wrapper) {

Diff for: Foundation/IndexSet.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ public struct IndexSet : ReferenceConvertible, Equatable, BidirectionalCollectio
678678
return result
679679
case .Mutable(let m):
680680
// Only create a new box if we are not uniquely referenced
681-
if !isUniquelyReferencedNonObjC(&_handle) {
681+
if !isKnownUniquelyReferenced(&_handle) {
682682
let copy = m.mutableCopy(with: nil) as! NSMutableIndexSet
683683
_handle = _MutablePairHandle(copy, copying: false)
684684
let result = try whatToDo(copy)

Diff for: Foundation/URLRequest.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public struct URLRequest : ReferenceConvertible, CustomStringConvertible, Equata
2222
internal var _handle: _MutableHandle<NSMutableURLRequest>
2323

2424
internal mutating func _applyMutation<ReturnType>(_ whatToDo : @noescape (NSMutableURLRequest) -> ReturnType) -> ReturnType {
25-
if !isUniquelyReferencedNonObjC(&_handle) {
25+
if !isKnownUniquelyReferenced(&_handle) {
2626
let ref = _handle._uncopiedReference()
2727
_handle = _MutableHandle(reference: ref)
2828
}

0 commit comments

Comments
 (0)