[stdlib] Kill off _isUniquelyReferenced

It was doing an unsafeBitCast and possibly not managing lifetimes;
replace it with more-typesafe and memory-safe calls where possible.

Swift SVN r22779
This commit is contained in:
Dave Abrahams
2014-10-15 22:25:12 +00:00
parent 4e31ae0a44
commit 56c4cb2d42
9 changed files with 40 additions and 21 deletions

View File

@@ -237,7 +237,7 @@ struct _SliceBuffer<T> : _ArrayBufferType {
}
mutating func isUniquelyReferenced() -> Bool {
return Swift._isUniquelyReferenced(&owner)
return isUniquelyReferencedNonObjC(&owner)
}
/// Access the element at `position`.