Skip to content

Commit 8b4b420

Browse files
authored
Merge pull request #1622 from ikesyo/4.2-remove-string-core-usages
[4.2] Remove deprecated `String._core` usages
2 parents 76e3f8f + 5d45dd2 commit 8b4b420

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Foundation/NSString.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ open class NSString : NSObject, NSCopying, NSMutableCopying, NSSecureCoding, NSC
296296
internal func _fastCStringContents(_ nullTerminated: Bool) -> UnsafePointer<Int8>? {
297297
if type(of: self) == NSString.self || type(of: self) == NSMutableString.self {
298298
if _storage._guts._isContiguousASCII {
299-
return unsafeBitCast(_storage._core.startASCII, to: UnsafePointer<Int8>.self)
299+
return unsafeBitCast(_storage._guts.startASCII, to: UnsafePointer<Int8>.self)
300300
}
301301
}
302302
return nil
@@ -305,7 +305,7 @@ open class NSString : NSObject, NSCopying, NSMutableCopying, NSSecureCoding, NSC
305305
internal var _fastContents: UnsafePointer<UniChar>? {
306306
if type(of: self) == NSString.self || type(of: self) == NSMutableString.self {
307307
if _storage._guts._isContiguousUTF16 {
308-
return UnsafePointer<UniChar>(_storage._core.startUTF16)
308+
return UnsafePointer<UniChar>(_storage._guts.startUTF16)
309309
}
310310
}
311311
return nil
@@ -858,7 +858,7 @@ extension NSString {
858858
if type(of: self) == NSString.self || type(of: self) == NSMutableString.self {
859859
if _storage._guts._isContiguousASCII {
860860
used = min(self.length, maxBufferCount - 1)
861-
_storage._core.startASCII.withMemoryRebound(to: Int8.self,
861+
_storage._guts.startASCII.withMemoryRebound(to: Int8.self,
862862
capacity: used) {
863863
buffer.moveAssign(from: $0, count: used)
864864
}

0 commit comments

Comments
 (0)