Skip to content

Commit dad05ae

Browse files
committed
classForKeyedArchiver for remaining NSCFS types
1 parent c6b9fef commit dad05ae

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

Foundation/NSCFArray.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ internal final class _NSCFArray : NSMutableArray {
4242
override func removeObjectAtIndex(index: Int) {
4343
CFArrayRemoveValueAtIndex(_cfMutableObject, index)
4444
}
45+
46+
override var classForKeyedArchiver: AnyClass? {
47+
return NSMutableArray.self
48+
}
4549
}
4650

4751
internal func _CFSwiftArrayGetCount(array: AnyObject) -> CFIndex {

Foundation/NSCFDictionary.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ internal final class _NSCFDictionary : NSMutableDictionary {
8787
override func setObject(anObject: AnyObject, forKey aKey: NSObject) {
8888
CFDictionarySetValue(_cfMutableObject, unsafeBitCast(aKey, UnsafePointer<Void>.self), unsafeBitCast(anObject, UnsafePointer<Void>.self))
8989
}
90+
91+
override var classForKeyedArchiver: AnyClass? {
92+
return NSMutableDictionary.self
93+
}
9094
}
9195

9296
internal func _CFSwiftDictionaryGetCount(dictionary: AnyObject) -> CFIndex {

Foundation/NSCFSet.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,8 @@ internal final class _NSCFSet : NSMutableSet {
2727
required init(capacity numItems: Int) {
2828
fatalError()
2929
}
30+
31+
override var classForKeyedArchiver: AnyClass? {
32+
return NSMutableSet.self
33+
}
3034
}

0 commit comments

Comments
 (0)