Skip to content

Commit fc6b14f

Browse files
authored
stdlib: Remove unused, unsafe helper function _withUninitializedString (#33704)
No functionality change.
1 parent 76a7160 commit fc6b14f

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

stdlib/public/core/Misc.swift

-15
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,6 @@ public func _autorelease(_ x: AnyObject) {
4646
}
4747
#endif
4848

49-
/// Invoke `body` with an allocated, but uninitialized memory suitable for a
50-
/// `String` value.
51-
///
52-
/// This function is primarily useful to call various runtime functions
53-
/// written in C++.
54-
internal func _withUninitializedString<R>(
55-
_ body: (UnsafeMutablePointer<String>) -> R
56-
) -> (R, String) {
57-
let stringPtr = UnsafeMutablePointer<String>.allocate(capacity: 1)
58-
let bodyResult = body(stringPtr)
59-
let stringResult = stringPtr.move()
60-
stringPtr.deallocate()
61-
return (bodyResult, stringResult)
62-
}
63-
6449
// FIXME(ABI)#51 : this API should allow controlling different kinds of
6550
// qualification separately: qualification with module names and qualification
6651
// with type names that we are nested in.

0 commit comments

Comments
 (0)