From b231e7ebf8a2a43375ece5d4f3baf243f9073c14 Mon Sep 17 00:00:00 2001 From: cheatfate Date: Fri, 15 Jun 2018 03:58:17 +0300 Subject: [PATCH] Fix compilation errors. --- asyncdispatch2/transports/datagram.nim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/asyncdispatch2/transports/datagram.nim b/asyncdispatch2/transports/datagram.nim index 18749d39..4946dc53 100644 --- a/asyncdispatch2/transports/datagram.nim +++ b/asyncdispatch2/transports/datagram.nim @@ -510,7 +510,8 @@ proc newDatagramTransport*[T](cbproc: DatagramCallback, var fflags = flags + {GCUserData} GC_ref(udata) result = newDatagramTransportCommon(cbproc, remote, local, sock, - fflags, udata, child, bufSize) + fflags, cast[pointer](udata), + child, bufSize) proc newDatagramTransport6*(cbproc: DatagramCallback, remote: TransportAddress = AnyAddress6, @@ -546,7 +547,8 @@ proc newDatagramTransport6*[T](cbproc: DatagramCallback, var fflags = flags + {GCUserData} GC_ref(udata) result = newDatagramTransportCommon(cbproc, remote, local, sock, - fflags, udata, child, bufSize) + fflags, cast[pointer](udata), + child, bufSize) proc join*(transp: DatagramTransport) {.async.} = ## Wait until the transport ``transp`` will be closed.