Skip to content

Commit

Permalink
I'm so tired of the Swift team breaking things on non-Darwin platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
broadwaylamb committed Sep 24, 2021
1 parent aeb7763 commit 3a98618
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
7 changes: 7 additions & 0 deletions Sources/OpenCombineFoundation/Helpers/Portability.swift
Expand Up @@ -5,7 +5,10 @@
// Created by Sergej Jaskiewicz on 28.10.2020.
//

#if canImport(CoreFoundation)
import CoreFoundation
#endif

import Foundation

/// Use CoreFoundation on Darwin, since some pure
Expand Down Expand Up @@ -93,6 +96,7 @@ internal struct Timer {
#endif
}

#if canImport(CoreFoundation)
fileprivate func getCFRunLoopTimer() -> CFRunLoopTimer? {
#if canImport(Darwin)
return underlyingTimer
Expand All @@ -113,6 +117,7 @@ internal struct Timer {
fatalError("unreachable")
#endif
}
#endif // canImport(CoreFoundation)
}

extension RunLoop {
Expand All @@ -138,6 +143,7 @@ extension RunLoop {
}
}

#if canImport(CoreFoundation)
extension RunLoop.Mode {
fileprivate func asCFRunLoopMode() -> CFRunLoopMode {
#if canImport(Darwin)
Expand All @@ -159,3 +165,4 @@ extension RunLoop.Mode {
#endif
}
}
#endif // canImport(CoreFoundation)
1 change: 0 additions & 1 deletion Sources/OpenCombineFoundation/RunLoop+Scheduler.swift
Expand Up @@ -5,7 +5,6 @@
// Created by Sergej Jaskiewicz on 13.12.2019.
//

import CoreFoundation
import Foundation
import OpenCombine

Expand Down
1 change: 0 additions & 1 deletion Sources/OpenCombineFoundation/Timer+Publisher.swift
Expand Up @@ -5,7 +5,6 @@
// Created by Sergej Jaskiewicz on 23.06.2020.
//

import CoreFoundation
import Foundation
import OpenCombine

Expand Down

0 comments on commit 3a98618

Please sign in to comment.