Skip to content

Commit feb4421

Browse files
authored
Merge pull request #539 from compnerd/IO
IO: match the signature for `DispatchIO` with `dispatch_io_create`
2 parents 598ce42 + 22b6038 commit feb4421

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/swift/IO.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ extension DispatchIO {
6767

6868
public convenience init(
6969
type: StreamType,
70-
fileDescriptor: Int32,
70+
fileDescriptor: dispatch_fd_t,
7171
queue: DispatchQueue,
7272
cleanupHandler: @escaping (_ error: Int32) -> Void)
7373
{

src/swift/Private.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public func dispatch_queue_create_with_target(_ label: UnsafePointer<Int8>?, _ a
2727
}
2828

2929
@available(*, unavailable, renamed:"DispatchIO.init(type:fileDescriptor:queue:cleanupHandler:)")
30-
public func dispatch_io_create(_ type: UInt, _ fd: Int32, _ queue: DispatchQueue, _ cleanup_handler: @escaping (Int32) -> Void) -> DispatchIO
30+
public func dispatch_io_create(_ type: UInt, _ fd: dispatch_fd_t, _ queue: DispatchQueue, _ cleanup_handler: @escaping (Int32) -> Void) -> DispatchIO
3131
{
3232
fatalError()
3333
}

src/swift/Wrapper.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public class DispatchIO : DispatchObject {
9191
return unsafeBitCast(__wrapped, to: dispatch_object_t.self)
9292
}
9393

94-
internal init(__type: UInt, fd: Int32, queue: DispatchQueue,
94+
internal init(__type: UInt, fd: dispatch_fd_t, queue: DispatchQueue,
9595
handler: @escaping (_ error: Int32) -> Void) {
9696
__wrapped = dispatch_io_create(dispatch_io_type_t(__type), dispatch_fd_t(fd), queue.__wrapped, handler)
9797
}

0 commit comments

Comments
 (0)