@@ -189,7 +189,7 @@ public extension DispatchSource {
189189 }
190190
191191 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)
193193 return DispatchSource ( source: source) as DispatchSourceTimer
194194 }
195195
@@ -268,13 +268,11 @@ public extension DispatchSourceProcess {
268268 }
269269
270270 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)
273272 }
274273
275274 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)
278276 }
279277}
280278#endif
@@ -627,12 +625,12 @@ public extension DispatchSourceFileSystemObject {
627625
628626 public var data : DispatchSource . FileSystemEvent {
629627 let data = dispatch_source_get_data ( ( self as! DispatchSource ) . __wrapped)
630- return DispatchSource . FileSystemEvent ( rawValue: data)
628+ return DispatchSource . FileSystemEvent ( rawValue: UInt ( data) )
631629 }
632630
633631 public var mask : DispatchSource . FileSystemEvent {
634632 let data = dispatch_source_get_mask ( ( self as! DispatchSource ) . __wrapped)
635- return DispatchSource . FileSystemEvent ( rawValue: data)
633+ return DispatchSource . FileSystemEvent ( rawValue: UInt ( data) )
636634 }
637635}
638636#endif
@@ -644,7 +642,7 @@ public extension DispatchSourceUserDataAdd {
644642 /// - parameter data: the value to add to the current pending data. A value of zero
645643 /// has no effect and will not result in the submission of the event handler block.
646644 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) )
648646 }
649647}
650648
@@ -655,7 +653,7 @@ public extension DispatchSourceUserDataOr {
655653 /// - parameter data: The value to OR into the current pending data. A value of zero
656654 /// has no effect and will not result in the submission of the event handler block.
657655 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) )
659657 }
660658}
661659
@@ -667,6 +665,6 @@ public extension DispatchSourceUserDataReplace {
667665 /// A value of zero will be stored but will not result in the submission of the event
668666 /// handler block.
669667 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) )
671669 }
672670}
0 commit comments