Skip to content

Commit 7e741a6

Browse files
committed
Align __NSCFType with CFRuntimeBase / _CFInfo
__NSCFType has been using Int32 for _cfinfo. More recently in Swift 4, it’s been noticed that this can cause problems on 32-bit ARM and should be aligned with _CFInfo instead.
1 parent 6bd6e4d commit 7e741a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Foundation/NSSwiftRuntime.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ extension ObjCBool : CustomStringConvertible {
8787
#endif
8888

8989
internal class __NSCFType : NSObject {
90-
private var _cfinfo : Int32
90+
private var _cfinfo : _CFInfo
9191

9292
override init() {
9393
// This is not actually called; _CFRuntimeCreateInstance will initialize _cfinfo
94-
_cfinfo = 0
94+
_cfinfo = _CFInfo(typeID: 0)
9595
}
9696

9797
override var hash: Int {

0 commit comments

Comments
 (0)