Fix windows & macos

This commit is contained in:
Tanguy 2022-10-23 17:22:01 +02:00
parent 1c7ef8201e
commit 77cd194075
No known key found for this signature in database
GPG Key ID: 7DD8EC6B6CE6C45E
2 changed files with 2 additions and 2 deletions

View File

@ -417,7 +417,7 @@ when defined(windows):
## (Unix) for the specified dispatcher. ## (Unix) for the specified dispatcher.
return disp.ioPort return disp.ioPort
proc closeIoHandler(disp: PDispatcher): Handle {.raises: [Defect, OSError].} = proc closeIoHandler(disp: PDispatcher) {.raises: [Defect, OSError].} =
disp.ioPort.closeHandle() disp.ioPort.closeHandle()
proc newDispatcher*(): PDispatcher {.raises: [Defect, CatchableError].} = proc newDispatcher*(): PDispatcher {.raises: [Defect, CatchableError].} =

View File

@ -129,7 +129,7 @@ proc close*[T](s: Selector[T]) =
deallocSharedArray(s.fds) deallocSharedArray(s.fds)
deallocShared(cast[pointer](s)) deallocShared(cast[pointer](s))
if res1 != 0 or res2 != 0: if res1 != 0 or res2 != 0:
raiseIOSelectorsError(osLastError()) raiseOSError(osLastError())
proc newSelectEvent*(): SelectEvent = proc newSelectEvent*(): SelectEvent =
var fds: array[2, cint] var fds: array[2, cint]