We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
SIL/Utils.swift
1 parent d7b6332 commit eefcbf3Copy full SHA for eefcbf3
SwiftCompilerSources/Sources/SIL/Utils.swift
@@ -172,7 +172,7 @@ extension BridgedStringRef {
172
let buffer = UnsafeBufferPointer<UInt8>(start: data, count: Int(length))
173
return String(decoding: buffer, as: UTF8.self)
174
}
175
-
+
176
func takeString() -> String {
177
let str = string
178
freeBridgedStringRef(self)
@@ -205,7 +205,7 @@ extension UnsafeMutablePointer where Pointee == BridgedSwiftObject {
205
let ptr = Unmanaged.passUnretained(object).toOpaque()
206
self = ptr.bindMemory(to: BridgedSwiftObject.self, capacity: 1)
207
208
209
func getAs<T: AnyObject>(_ objectType: T.Type) -> T {
210
return Unmanaged<T>.fromOpaque(self).takeUnretainedValue()
211
0 commit comments