Skip to content

Commit 5a5d730

Browse files
Disable toll-free bridging for CFRunLoopTimer
Foundation.Timer is not currently implemented with a compatible memory layout so attempt to bridge these classes will fail. Disabling bridging allows code using CFRunLoopTimer to work until Foundation.Timer is reimplemented. Fixes https://bugs.swift.org/browse/SR-10465
1 parent 5f48836 commit 5a5d730

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
@@ -173,8 +173,8 @@ internal func __CFInitializeSwift() {
173173
_CFRuntimeBridgeTypeToClass(CFAttributedStringGetTypeID(), unsafeBitCast(NSMutableAttributedString.self, to: UnsafeRawPointer.self))
174174
// _CFRuntimeBridgeTypeToClass(CFReadStreamGetTypeID(), unsafeBitCast(InputStream.self, UnsafeRawPointer.self))
175175
// _CFRuntimeBridgeTypeToClass(CFWriteStreamGetTypeID(), unsafeBitCast(OutputStream.self, UnsafeRawPointer.self))
176-
_CFRuntimeBridgeTypeToClass(CFRunLoopTimerGetTypeID(), unsafeBitCast(Timer.self, to: UnsafeRawPointer.self))
177-
176+
//_CFRuntimeBridgeTypeToClass(CFRunLoopTimerGetTypeID(), unsafeBitCast(Timer.self, to: UnsafeRawPointer.self))
177+
178178
__CFSwiftBridge.NSObject.isEqual = _CFSwiftIsEqual
179179
__CFSwiftBridge.NSObject.hash = _CFSwiftGetHash
180180
__CFSwiftBridge.NSObject._cfTypeID = _CFSwiftGetTypeID

0 commit comments

Comments
 (0)