WIP: Objective-C migrations

This commit is contained in:
John Estropia
2016-03-29 14:46:31 +09:00
parent e99d19d2ac
commit e25e198bf8
5 changed files with 403 additions and 33 deletions

View File

@@ -92,13 +92,13 @@ internal func bridge(@noescape closure: () throws -> Void) throws {
}
}
internal func bridge<T>(error: NSErrorPointer, @noescape _ closure: () throws -> T) -> T? {
internal func bridge<T: CoreStoreSwiftType>(error: NSErrorPointer, @noescape _ closure: () throws -> T) -> T.ObjectiveCType? {
do {
let result = try closure()
error.memory = nil
return result
return result.bridgeToObjectiveC
}
catch let swiftError {