make more parts of the stdlib compile with --styleCheck:error

This commit is contained in:
Araq 2019-07-10 15:48:30 +02:00
commit bc7733827d
17 changed files with 98 additions and 98 deletions

View file

@ -75,7 +75,7 @@ proc newSelector*[T](): Selector[T] =
# Retrieve the maximum fd count (for current OS) via getrlimit()
var a = RLimit()
if getrlimit(posix.RLIMIT_NOFILE, a) != 0:
raiseOsError(osLastError())
raiseOSError(osLastError())
var maxFD = int(a.rlim_max)
doAssert(maxFD > 0)
# Start with a reasonable size, checkFd() will grow this on demand
@ -83,7 +83,7 @@ proc newSelector*[T](): Selector[T] =
var epollFD = epoll_create(MAX_EPOLL_EVENTS)
if epollFD < 0:
raiseOsError(osLastError())
raiseOSError(osLastError())
when hasThreadSupport:
result = cast[Selector[T]](allocShared0(sizeof(SelectorImpl[T])))
@ -369,7 +369,7 @@ proc registerEvent*[T](s: Selector[T], ev: SelectEvent, data: T) =
inc(s.count)
proc selectInto*[T](s: Selector[T], timeout: int,
results: var openarray[ReadyKey]): int =
results: var openArray[ReadyKey]): int =
var
resTable: array[MAX_EPOLL_EVENTS, EpollEvent]
maxres = MAX_EPOLL_EVENTS

View file

@ -440,7 +440,7 @@ proc unregister*[T](s: Selector[T], ev: SelectEvent) =
dec(s.count)
proc selectInto*[T](s: Selector[T], timeout: int,
results: var openarray[ReadyKey]): int =
results: var openArray[ReadyKey]): int =
var
tv: Timespec
resTable: array[MAX_KQUEUE_EVENTS, KEvent]