Remove some unused symbols.

This commit is contained in:
cheatfate 2019-06-08 08:37:58 +03:00
parent a8a1138b8b
commit f83d1b4da4
No known key found for this signature in database
GPG Key ID: 46ADD633A7201F95
2 changed files with 1 additions and 9 deletions

View File

@ -30,9 +30,7 @@ proc oneOf*[A, B](fut1: Future[A], fut2: Future[B]): Future[void] =
## error, so you need to check `fut1` and `fut2` for error. ## error, so you need to check `fut1` and `fut2` for error.
var retFuture = newFuture[void]("chunked.oneOf()") var retFuture = newFuture[void]("chunked.oneOf()")
proc cb(data: pointer) {.gcsafe.} = proc cb(data: pointer) {.gcsafe.} =
var index: int
if not retFuture.finished: if not retFuture.finished:
var fut = cast[FutureBase](data)
if cast[pointer](fut1) == data: if cast[pointer](fut1) == data:
fut2.removeCallback(cb) fut2.removeCallback(cb)
elif cast[pointer](fut2) == data: elif cast[pointer](fut2) == data:
@ -185,8 +183,7 @@ proc chunkedWriteLoop(stream: AsyncStreamWriter) {.async.} =
var wstream = cast[ChunkedStreamWriter](stream) var wstream = cast[ChunkedStreamWriter](stream)
var exitFut = wstream.exevent.wait() var exitFut = wstream.exevent.wait()
var buffer: array[16, byte] var buffer: array[16, byte]
var error: ref Exception var wFut1, wFut2: Future[void]
var wFut1, wFut2, wFut3: Future[void]
wstream.state = AsyncStreamState.Running wstream.state = AsyncStreamState.Running
while true: while true:

View File

@ -267,10 +267,6 @@ when defined(windows):
template getFileHandle(v: untyped): Handle = template getFileHandle(v: untyped): Handle =
cast[Handle]((v).buflen) cast[Handle]((v).buflen)
template slideBuffer(t, o: untyped) =
(t).wwsabuf.buf = cast[cstring](cast[uint]((t).wwsabuf.buf) + uint(o))
(t).wwsabuf.len -= int32(o)
template setReaderWSABuffer(t: untyped) = template setReaderWSABuffer(t: untyped) =
(t).rwsabuf.buf = cast[cstring]( (t).rwsabuf.buf = cast[cstring](
cast[uint](addr t.buffer[0]) + uint((t).roffset)) cast[uint](addr t.buffer[0]) + uint((t).roffset))
@ -726,7 +722,6 @@ when defined(windows):
proc acceptPipeLoop(udata: pointer) {.gcsafe, nimcall.} = proc acceptPipeLoop(udata: pointer) {.gcsafe, nimcall.} =
var ovl = cast[PtrCustomOverlapped](udata) var ovl = cast[PtrCustomOverlapped](udata)
var server = cast[StreamServer](ovl.data.udata) var server = cast[StreamServer](ovl.data.udata)
var loop = getGlobalDispatcher()
while true: while true:
if server.apending: if server.apending: