WIP: segfault

This commit is contained in:
John Rommel Estropia
2016-07-20 08:12:04 +09:00
parent f486ace437
commit 267c21063a
129 changed files with 2205 additions and 3282 deletions

View File

@@ -54,12 +54,12 @@ public final class CSDataStack: NSObject, CoreStoreObjectiveCType {
- parameter versionChain: the version strings that indicate the sequence of model versions to be used as the order for progressive migrations. If not specified, will default to a non-migrating data stack.
*/
@objc
public convenience init(modelName: String?, bundle: NSBundle?, versionChain: [String]?) {
public convenience init(modelName: String?, bundle: Bundle?, versionChain: [String]?) {
self.init(
DataStack(
modelName: modelName ?? DataStack.applicationName,
bundle: bundle ?? NSBundle.mainBundle(),
bundle: bundle ?? Bundle.main,
migrationChain: versionChain.flatMap { MigrationChain($0) } ?? nil
)
)
@@ -73,12 +73,12 @@ public final class CSDataStack: NSObject, CoreStoreObjectiveCType {
- parameter versionTree: the version strings that indicate the sequence of model versions to be used as the order for progressive migrations. If not specified, will default to a non-migrating data stack.
*/
@objc
public convenience init(modelName: String?, bundle: NSBundle?, versionTree: [String: String]?) {
public convenience init(modelName: String?, bundle: Bundle?, versionTree: [String: String]?) {
self.init(
DataStack(
modelName: modelName ?? DataStack.applicationName,
bundle: bundle ?? NSBundle.mainBundle(),
bundle: bundle ?? Bundle.main,
migrationChain: versionTree.flatMap { MigrationChain($0) } ?? nil
)
)
@@ -142,7 +142,7 @@ public final class CSDataStack: NSObject, CoreStoreObjectiveCType {
- returns: the `NSManagedObject` class for the given entity name, or `nil` if not found
*/
@objc
public func entityClassWithName(name: String) -> NSManagedObject.Type? {
public func entityClassWithName(_ name: String) -> NSManagedObject.Type? {
return self.bridgeToSwift.entityTypesByName[name]
}
@@ -151,7 +151,7 @@ public final class CSDataStack: NSObject, CoreStoreObjectiveCType {
Returns the `NSEntityDescription` for the specified `NSManagedObject` subclass from stack's model.
*/
@objc
public func entityDescriptionForClass(type: NSManagedObject.Type) -> NSEntityDescription? {
public func entityDescriptionForClass(_ type: NSManagedObject.Type) -> NSEntityDescription? {
return self.bridgeToSwift.entityDescriptionForType(type)
}
@@ -166,11 +166,11 @@ public final class CSDataStack: NSObject, CoreStoreObjectiveCType {
- returns: the `CSInMemoryStore` added to the stack
*/
@objc
public func addInMemoryStorageAndWaitAndReturnError(error: NSErrorPointer) -> CSInMemoryStore? {
public func addInMemoryStorageAndWaitAndReturnError(_ error: NSErrorPointer) -> CSInMemoryStore? {
return bridge(error) {
try self.bridgeToSwift.addStorageAndWait(InMemoryStore)
try self.bridgeToSwift.addStorageAndWait(InMemoryStore.self)
}
}
@@ -184,11 +184,11 @@ public final class CSDataStack: NSObject, CoreStoreObjectiveCType {
- returns: the `CSSQLiteStore` added to the stack
*/
@objc
public func addSQLiteStorageAndWaitAndReturnError(error: NSErrorPointer) -> CSSQLiteStore? {
public func addSQLiteStorageAndWaitAndReturnError(_ error: NSErrorPointer) -> CSSQLiteStore? {
return bridge(error) {
try self.bridgeToSwift.addStorageAndWait(SQLiteStore)
try self.bridgeToSwift.addStorageAndWait(SQLiteStore.self)
}
}
@@ -206,7 +206,7 @@ public final class CSDataStack: NSObject, CoreStoreObjectiveCType {
- returns: the `CSInMemoryStore` added to the stack
*/
@objc
public func addInMemoryStorageAndWait(storage: CSInMemoryStore, error: NSErrorPointer) -> CSInMemoryStore? {
public func addInMemoryStorageAndWait(_ storage: CSInMemoryStore, error: NSErrorPointer) -> CSInMemoryStore? {
return bridge(error) {
@@ -228,7 +228,7 @@ public final class CSDataStack: NSObject, CoreStoreObjectiveCType {
- returns: the `CSSQLiteStore` added to the stack
*/
@objc
public func addSQLiteStorageAndWait(storage: CSSQLiteStore, error: NSErrorPointer) -> CSSQLiteStore? {
public func addSQLiteStorageAndWait(_ storage: CSSQLiteStore, error: NSErrorPointer) -> CSSQLiteStore? {
return bridge(error) {
@@ -244,7 +244,7 @@ public final class CSDataStack: NSObject, CoreStoreObjectiveCType {
return ObjectIdentifier(self.bridgeToSwift).hashValue
}
public override func isEqual(object: AnyObject?) -> Bool {
public override func isEqual(_ object: AnyObject?) -> Bool {
guard let object = object as? CSDataStack else {