Skip to content

Commit de5cc6f

Browse files
dingobyektopley-apple
authored andcommitted
Fix redundant access-level modifiers to make corelibs-dispatch adapted to swiftlang/swift#18623.
Signed-off-by: Kim Topley <[email protected]>
1 parent c5279d4 commit de5cc6f

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

src/swift/Dispatch.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public enum DispatchTimeoutResult {
133133

134134
/// dispatch_group
135135

136-
public extension DispatchGroup {
136+
extension DispatchGroup {
137137
public func notify(qos: DispatchQoS = .unspecified, flags: DispatchWorkItemFlags = [], queue: DispatchQueue, execute work: @escaping @convention(block) () -> ()) {
138138
if #available(macOS 10.10, iOS 8.0, *), qos != .unspecified || !flags.isEmpty {
139139
let item = DispatchWorkItem(qos: qos, flags: flags, block: work)
@@ -163,7 +163,7 @@ public extension DispatchGroup {
163163

164164
/// dispatch_semaphore
165165

166-
public extension DispatchSemaphore {
166+
extension DispatchSemaphore {
167167
@discardableResult
168168
public func signal() -> Int {
169169
return Int(dispatch_semaphore_signal(self.__wrapped))

src/swift/IO.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import CDispatch
1414

15-
public extension DispatchIO {
15+
extension DispatchIO {
1616

1717
public enum StreamType : UInt {
1818
case stream = 0

src/swift/Queue.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ internal class _DispatchSpecificValue<T> {
2424
internal init(value: T) { self.value = value }
2525
}
2626

27-
public extension DispatchQueue {
27+
extension DispatchQueue {
2828
public struct Attributes : OptionSet {
2929
public let rawValue: UInt64
3030
public init(rawValue: UInt64) { self.rawValue = rawValue }

src/swift/Source.swift

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import CDispatch
1414
import _SwiftDispatchOverlayShims
1515

16-
public extension DispatchSourceProtocol {
16+
extension DispatchSourceProtocol {
1717

1818
public func setEventHandler(qos: DispatchQoS = .unspecified, flags: DispatchWorkItemFlags = [], handler: DispatchSourceHandler?) {
1919
if #available(macOS 10.10, iOS 8.0, *), let h = handler, qos != .unspecified || !flags.isEmpty {
@@ -91,7 +91,7 @@ public extension DispatchSourceProtocol {
9191
}
9292
}
9393

94-
public extension DispatchSource {
94+
extension DispatchSource {
9595
#if HAVE_MACH
9696
public struct MachSendEvent : OptionSet, RawRepresentable {
9797
public let rawValue: UInt
@@ -222,7 +222,7 @@ public extension DispatchSource {
222222
}
223223

224224
#if HAVE_MACH
225-
public extension DispatchSourceMachSend {
225+
extension DispatchSourceMachSend {
226226
public var handle: mach_port_t {
227227
return mach_port_t(dispatch_source_get_handle(self as! DispatchSource))
228228
}
@@ -240,15 +240,15 @@ public extension DispatchSourceMachSend {
240240
#endif
241241

242242
#if HAVE_MACH
243-
public extension DispatchSourceMachReceive {
243+
extension DispatchSourceMachReceive {
244244
public var handle: mach_port_t {
245245
return mach_port_t(dispatch_source_get_handle(self as! DispatchSource))
246246
}
247247
}
248248
#endif
249249

250250
#if HAVE_MACH
251-
public extension DispatchSourceMemoryPressure {
251+
extension DispatchSourceMemoryPressure {
252252
public var data: DispatchSource.MemoryPressureEvent {
253253
let data = dispatch_source_get_data(self as! DispatchSource)
254254
return DispatchSource.MemoryPressureEvent(rawValue: data)
@@ -262,7 +262,7 @@ public extension DispatchSourceMemoryPressure {
262262
#endif
263263

264264
#if !os(Linux) && !os(Android)
265-
public extension DispatchSourceProcess {
265+
extension DispatchSourceProcess {
266266
public var handle: pid_t {
267267
return pid_t(dispatch_source_get_handle(self as! DispatchSource))
268268
}
@@ -277,7 +277,7 @@ public extension DispatchSourceProcess {
277277
}
278278
#endif
279279

280-
public extension DispatchSourceTimer {
280+
extension DispatchSourceTimer {
281281
///
282282
/// Sets the deadline and leeway for a timer event that fires once.
283283
///
@@ -618,7 +618,7 @@ public extension DispatchSourceTimer {
618618
}
619619

620620
#if !os(Linux) && !os(Android)
621-
public extension DispatchSourceFileSystemObject {
621+
extension DispatchSourceFileSystemObject {
622622
public var handle: Int32 {
623623
return Int32(dispatch_source_get_handle((self as! DispatchSource).__wrapped))
624624
}
@@ -635,7 +635,7 @@ public extension DispatchSourceFileSystemObject {
635635
}
636636
#endif
637637

638-
public extension DispatchSourceUserDataAdd {
638+
extension DispatchSourceUserDataAdd {
639639
/// Merges data into a dispatch source of type `DISPATCH_SOURCE_TYPE_DATA_ADD`
640640
/// and submits its event handler block to its target queue.
641641
///
@@ -646,7 +646,7 @@ public extension DispatchSourceUserDataAdd {
646646
}
647647
}
648648

649-
public extension DispatchSourceUserDataOr {
649+
extension DispatchSourceUserDataOr {
650650
/// Merges data into a dispatch source of type `DISPATCH_SOURCE_TYPE_DATA_OR` and
651651
/// submits its event handler block to its target queue.
652652
///
@@ -657,7 +657,7 @@ public extension DispatchSourceUserDataOr {
657657
}
658658
}
659659

660-
public extension DispatchSourceUserDataReplace {
660+
extension DispatchSourceUserDataReplace {
661661
/// Merges data into a dispatch source of type `DISPATCH_SOURCE_TYPE_DATA_REPLACE`
662662
/// and submits its event handler block to its target queue.
663663
///

0 commit comments

Comments
 (0)