Skip to content

Commit 5958c1e

Browse files
Catfish-Manairspeedswift
authored andcommitted
Pseudo-cherry-pick 9669120#r31799259 to the 5.0 branch, since it no longer merges cleanly over (#21807)
1 parent 3ef4a2d commit 5958c1e

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

stdlib/public/core/StringBridge.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -302,12 +302,9 @@ extension String {
302302
// The @_swift_native_objc_runtime_base attribute
303303
// This allows us to subclass an Objective-C class and use the fast Swift
304304
// memory allocator.
305-
@_fixed_layout // FIXME(sil-serialize-all)
306305
@objc @_swift_native_objc_runtime_base(__SwiftNativeNSStringBase)
307-
public class __SwiftNativeNSString {
308-
@usableFromInline // FIXME(sil-serialize-all)
309-
@objc
310-
internal init() {}
306+
class __SwiftNativeNSString {
307+
@objc internal init() {}
311308
deinit {}
312309
}
313310

stdlib/public/core/StringStorage.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,8 @@ extension _AbstractStringStorage {
7676
fallthrough
7777
case (_cocoaUTF8Encoding, _):
7878
guard maxLength >= count + 1 else { return 0 }
79-
let buffer =
80-
UnsafeMutableBufferPointer(start: outputPtr, count: maxLength)
81-
buffer.initialize(from: UnsafeBufferPointer(start: start, count: count))
79+
let buffer = UnsafeMutableBufferPointer(start: outputPtr, count: maxLength)
80+
_ = buffer.initialize(from: UnsafeBufferPointer(start: start, count: count))
8281
buffer[count] = 0
8382
return 1
8483
default:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1+
Class __SwiftNativeNSString has been removed

0 commit comments

Comments
 (0)