@@ -189,7 +189,7 @@ public extension DispatchSource {
189
189
}
190
190
191
191
public class func makeTimerSource( flags: TimerFlags = [ ] , queue: DispatchQueue ? = nil ) -> DispatchSourceTimer {
192
- let source = dispatch_source_create ( _swift_dispatch_source_type_TIMER ( ) , 0 , flags. rawValue, queue? . __wrapped)
192
+ let source = dispatch_source_create ( _swift_dispatch_source_type_TIMER ( ) , 0 , UInt ( flags. rawValue) , queue? . __wrapped)
193
193
return DispatchSource ( source: source) as DispatchSourceTimer
194
194
}
195
195
@@ -268,13 +268,11 @@ public extension DispatchSourceProcess {
268
268
}
269
269
270
270
public var data : DispatchSource . ProcessEvent {
271
- let data = dispatch_source_get_data ( self as! DispatchSource )
272
- return DispatchSource . ProcessEvent ( rawValue: data)
271
+ return DispatchSource . ProcessEvent ( rawValue: ( self as! DispatchSource ) . data)
273
272
}
274
273
275
274
public var mask : DispatchSource . ProcessEvent {
276
- let mask = dispatch_source_get_mask ( self as! DispatchSource )
277
- return DispatchSource . ProcessEvent ( rawValue: mask)
275
+ return DispatchSource . ProcessEvent ( rawValue: ( self as! DispatchSource ) . mask)
278
276
}
279
277
}
280
278
#endif
@@ -627,12 +625,12 @@ public extension DispatchSourceFileSystemObject {
627
625
628
626
public var data : DispatchSource . FileSystemEvent {
629
627
let data = dispatch_source_get_data ( ( self as! DispatchSource ) . __wrapped)
630
- return DispatchSource . FileSystemEvent ( rawValue: data)
628
+ return DispatchSource . FileSystemEvent ( rawValue: UInt ( data) )
631
629
}
632
630
633
631
public var mask : DispatchSource . FileSystemEvent {
634
632
let data = dispatch_source_get_mask ( ( self as! DispatchSource ) . __wrapped)
635
- return DispatchSource . FileSystemEvent ( rawValue: data)
633
+ return DispatchSource . FileSystemEvent ( rawValue: UInt ( data) )
636
634
}
637
635
}
638
636
#endif
@@ -644,7 +642,7 @@ public extension DispatchSourceUserDataAdd {
644
642
/// - parameter data: the value to add to the current pending data. A value of zero
645
643
/// has no effect and will not result in the submission of the event handler block.
646
644
public func add( data: UInt ) {
647
- dispatch_source_merge_data ( ( self as! DispatchSource ) . __wrapped, data)
645
+ dispatch_source_merge_data ( ( self as! DispatchSource ) . __wrapped, UInt ( data) )
648
646
}
649
647
}
650
648
@@ -655,7 +653,7 @@ public extension DispatchSourceUserDataOr {
655
653
/// - parameter data: The value to OR into the current pending data. A value of zero
656
654
/// has no effect and will not result in the submission of the event handler block.
657
655
public func or( data: UInt ) {
658
- dispatch_source_merge_data ( ( self as! DispatchSource ) . __wrapped, data)
656
+ dispatch_source_merge_data ( ( self as! DispatchSource ) . __wrapped, UInt ( data) )
659
657
}
660
658
}
661
659
@@ -667,6 +665,6 @@ public extension DispatchSourceUserDataReplace {
667
665
/// A value of zero will be stored but will not result in the submission of the event
668
666
/// handler block.
669
667
public func replace( data: UInt ) {
670
- dispatch_source_merge_data ( ( self as! DispatchSource ) . __wrapped, data)
668
+ dispatch_source_merge_data ( ( self as! DispatchSource ) . __wrapped, UInt ( data) )
671
669
}
672
670
}
0 commit comments