Skip to content

Commit f0126a3

Browse files
committed
Corrections:
- Members should match the publicness/openness of their containers - Add a warning to getCFRunLoop() to warn porters that it's not going to be around forever.
1 parent 3ff76f0 commit f0126a3

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Sources/Foundation/RunLoop.swift

+6-5
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ open class RunLoop: NSObject {
7878
}
7979
}
8080

81+
@available(*, deprecated, message: "Directly accessing the run loop may cause your code to not become portable in the future.")
8182
open func getCFRunLoop() -> CFRunLoop {
8283
return _cfRunLoop
8384
}
@@ -229,7 +230,7 @@ extension RunLoop {
229230
}
230231

231232
@available(*, deprecated, message: "For XCTest use only.")
232-
func _add(_ source: _Source, forMode mode: RunLoop.Mode) {
233+
public func _add(_ source: _Source, forMode mode: RunLoop.Mode) {
233234
CFRunLoopAddSource(_cfRunLoop, source.cfSource, mode._cfStringUniquingKnown)
234235
}
235236
}
@@ -281,11 +282,11 @@ extension RunLoop {
281282
CFRunLoopObserverInvalidate(cfObserver)
282283
}
283284

284-
var order: Int {
285+
public var order: Int {
285286
Int(CFRunLoopObserverGetOrder(cfObserver))
286287
}
287288

288-
var isValid: Bool {
289+
public var isValid: Bool {
289290
CFRunLoopObserverIsValid(cfObserver)
290291
}
291292
}
@@ -357,11 +358,11 @@ extension RunLoop {
357358
CFRunLoopSourceInvalidate(cfSource)
358359
}
359360

360-
var order: Int {
361+
open var order: Int {
361362
Int(CFRunLoopSourceGetOrder(cfSource))
362363
}
363364

364-
var isValid: Bool {
365+
open var isValid: Bool {
365366
CFRunLoopSourceIsValid(cfSource)
366367
}
367368

0 commit comments

Comments
 (0)