Skip to content

Commit 4c3205c

Browse files
committed
Use the right annotation for bridged CFKeyedArchiverUIDRef type
1 parent aa504dc commit 4c3205c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

CoreFoundation/Base.subproj/ForFoundationOnly.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ _CF_EXPORT_SCOPE_END
372372

373373
// ---- Binary plist material ----------------------------------------
374374
_CF_EXPORT_SCOPE_BEGIN
375-
typedef const struct __CFKeyedArchiverUID * CFKeyedArchiverUIDRef;
375+
typedef const struct CF_BRIDGED_TYPE(_NSKeyedArchiverUID) __CFKeyedArchiverUID * CFKeyedArchiverUIDRef;
376376
CF_EXPORT CFTypeID _CFKeyedArchiverUIDGetTypeID(void);
377377
CF_EXPORT CFKeyedArchiverUIDRef _CFKeyedArchiverUIDCreate(CFAllocatorRef allocator, uint32_t value);
378378
CF_EXPORT uint32_t _CFKeyedArchiverUIDGetValue(CFKeyedArchiverUIDRef uid);

Foundation/NSKeyedArchiverHelpers.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99

1010
import CoreFoundation
1111

12-
extension CFKeyedArchiverUIDRef : _NSBridgable {
12+
extension CFKeyedArchiverUID : _NSBridgable {
1313
typealias NSType = _NSKeyedArchiverUID
1414

1515
internal var _nsObject: NSType { return unsafeBitCast(self, to: NSType.self) }
1616
}
1717

1818
internal class _NSKeyedArchiverUID : NSObject {
19-
typealias CFType = CFURL
19+
typealias CFType = CFKeyedArchiverUID
2020
internal var _base = _CFInfo(typeID: _CFKeyedArchiverUIDGetTypeID())
2121
internal var value : UInt32 = 0
2222

@@ -29,7 +29,7 @@ internal class _NSKeyedArchiverUID : NSObject {
2929
}
3030

3131
open override var hash: Int {
32-
return Int(bitPattern: CFHash(_cfObject))
32+
return Int(bitPattern: CFHash(_cfObject as CFTypeRef!))
3333
}
3434

3535
open override func isEqual(_ object: AnyObject?) -> Bool {

0 commit comments

Comments
 (0)