stdlib and compiler don't use .immediate anymore
This commit is contained in:
parent
9ee5b5eabc
commit
60b187513e
36 changed files with 169 additions and 172 deletions
|
|
@ -1000,11 +1000,11 @@ proc readLine*(socket: Socket, line: var TaintedString, timeout = -1,
|
|||
##
|
||||
## **Warning**: Only the ``SafeDisconn`` flag is currently supported.
|
||||
|
||||
template addNLIfEmpty(): stmt =
|
||||
template addNLIfEmpty() =
|
||||
if line.len == 0:
|
||||
line.string.add("\c\L")
|
||||
|
||||
template raiseSockError(): stmt {.dirty, immediate.} =
|
||||
template raiseSockError() {.dirty.} =
|
||||
let lastError = getSocketError(socket)
|
||||
if flags.isDisconnectionError(lastError): setLen(line.string, 0); return
|
||||
socket.socketError(n, lastError = lastError)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue