Merge branch 'stringify-array' of https://github.com/krux02/Nim into krux02-stringify-array
This commit is contained in:
commit
db0d353281
9 changed files with 89 additions and 71 deletions
|
|
@ -500,7 +500,7 @@ proc getLocalAddr*(socket: SocketHandle, domain: Domain): (string, Port) =
|
|||
if inet_ntop(name.sin6_family.cint,
|
||||
addr name.sin6_addr, buf.cstring, sizeof(buf).int32).isNil:
|
||||
raiseOSError(osLastError())
|
||||
result = ($buf, Port(nativesockets.ntohs(name.sin6_port)))
|
||||
result = ($buf.cstring, Port(nativesockets.ntohs(name.sin6_port)))
|
||||
else:
|
||||
raiseOSError(OSErrorCode(-1), "invalid socket family in getLocalAddr")
|
||||
|
||||
|
|
@ -536,7 +536,7 @@ proc getPeerAddr*(socket: SocketHandle, domain: Domain): (string, Port) =
|
|||
if inet_ntop(name.sin6_family.cint,
|
||||
addr name.sin6_addr, buf.cstring, sizeof(buf).int32).isNil:
|
||||
raiseOSError(osLastError())
|
||||
result = ($buf, Port(nativesockets.ntohs(name.sin6_port)))
|
||||
result = ($buf.cstring, Port(nativesockets.ntohs(name.sin6_port)))
|
||||
else:
|
||||
raiseOSError(OSErrorCode(-1), "invalid socket family in getLocalAddr")
|
||||
|
||||
|
|
|
|||
|
|
@ -790,7 +790,7 @@ iterator walkDir*(dir: string; relative=false): tuple[kind: PathComponent, path:
|
|||
while true:
|
||||
var x = readdir(d)
|
||||
if x == nil: break
|
||||
var y = $x.d_name
|
||||
var y = $x.d_name.cstring
|
||||
if y != "." and y != "..":
|
||||
var s: Stat
|
||||
if not relative:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue