mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Strict memory safety] Update standard library for unsafe treated as a call effect
(cherry picked from commit 050a514588)
This commit is contained in:
@@ -973,7 +973,7 @@ extension _StringObject {
|
||||
#if _runtime(_ObjC)
|
||||
if largeFastIsConstantCocoa {
|
||||
return unsafe withCocoaObject {
|
||||
unsafe _getNSCFConstantStringContentsPointer($0)
|
||||
_getNSCFConstantStringContentsPointer($0)
|
||||
}
|
||||
}
|
||||
if largeIsCocoa {
|
||||
@@ -989,7 +989,7 @@ extension _StringObject {
|
||||
internal var sharedUTF8: UnsafeBufferPointer<UInt8> {
|
||||
@_effects(releasenone) @inline(never) get {
|
||||
_internalInvariant(largeFastIsShared)
|
||||
let start = unsafe self.getSharedUTF8Start()
|
||||
let start = self.getSharedUTF8Start()
|
||||
return unsafe UnsafeBufferPointer(start: start, count: largeCount)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user