Fix a few deprecation warnings

This commit is contained in:
def 2015-07-11 14:39:19 +02:00
commit c50b5b62ef
32 changed files with 53 additions and 65 deletions

View file

@ -40,7 +40,7 @@ type
Actor[In, Out] = object{.pure, final.}
i: Channel[Task[In, Out]]
t: TThread[ptr Actor[In, Out]]
t: Thread[ptr Actor[In, Out]]
PActor*[In, Out] = ptr Actor[In, Out] ## an actor
{.deprecated: [TTask: Task, TActor: Actor].}

View file

@ -39,7 +39,6 @@ when hostOS == "solaris":
import os, parseutils
from times import epochTime
import unsigned
when defined(ssl):
import openssl
@ -703,7 +702,7 @@ proc getHostByAddr*(ip: string): Hostent {.tags: [ReadIOEffect].} =
var s = posix.gethostbyaddr(addr(myaddr), sizeof(myaddr).Socklen,
cint(posix.AF_INET))
if s == nil:
raiseOSError(osLastError(), $hstrerror(h_errno))
raise newException(OSError, $hstrerror(h_errno))
result.name = $s.h_name
result.aliases = cstringArrayToSeq(s.h_aliases)