Skip to content

Commit 6579490

Browse files
committed
Change threadDictionary to NSMutableDictionary
1 parent 6b26ed1 commit 6579490

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Foundation/Thread.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ open class Thread : NSObject {
153153
#endif
154154
internal var _status = _NSThreadStatus.initialized
155155
internal var _cancelled = false
156-
/// - Note: this differs from the Darwin implementation in that the keys must be Strings
157-
open var threadDictionary = [String : Any]()
156+
157+
open private(set) var threadDictionary: NSMutableDictionary = NSMutableDictionary()
158158

159159
internal init(thread: pthread_t) {
160160
// Note: even on Darwin this is a non-optional pthread_t; this is only used for valid threads, which are never null pointers.

Foundation/XMLParser.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ open class XMLParser : NSObject {
471471
if let p = parser {
472472
Thread.current.threadDictionary["__CurrentNSXMLParser"] = p
473473
} else {
474-
Thread.current.threadDictionary.removeValue(forKey: "__CurrentNSXMLParser")
474+
Thread.current.threadDictionary.removeObject(forKey: "__CurrentNSXMLParser")
475475
}
476476
}
477477

0 commit comments

Comments
 (0)