diff options
author | Dominik Picheta <dominikpicheta@googlemail.com> | 2012-07-23 21:29:10 +0100 |
---|---|---|
committer | Dominik Picheta <dominikpicheta@googlemail.com> | 2012-07-23 21:29:10 +0100 |
commit | 3ffff9ec43fd68a4b9f70908aa6673c857fbfc8b (patch) | |
tree | 077b0010e2da402430548be38ae14672bf3ac426 /lib/pure | |
parent | 1be06ee2ded53f5048bd6a901e6d19fc75fb3067 (diff) | |
download | Nim-3ffff9ec43fd68a4b9f70908aa6673c857fbfc8b.tar.gz |
More deprecation warnings fixed.
Diffstat (limited to 'lib/pure')
-rw-r--r-- | lib/pure/asyncio.nim | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/pure/asyncio.nim b/lib/pure/asyncio.nim index 025ff5de0..2ac03061c 100644 --- a/lib/pure/asyncio.nim +++ b/lib/pure/asyncio.nim @@ -262,8 +262,9 @@ proc accept*(server: PAsyncSocket): PAsyncSocket {.deprecated.} = ## Equivalent to ``sockets.accept``. ## ## **Warning**: This is deprecated. - var (client, a) = server.acceptAddr() - return client + new(result) + var address = "" + server.acceptAddr(result, address) proc newDispatcher*(): PDispatcher = new(result) @@ -435,7 +436,10 @@ when isMainModule: proc testAccept(s: PAsyncSocket, arg: PObject) = echo("Accepting client! " & $PMyArg(arg).val) - var (client, address) = s.acceptAddr() + var client: PAsyncSocket + new(client) + var address = "" + s.acceptAddr(client, address) echo("Accepted ", address) client.handleRead = testRead var userArg: PIntType |