Use .. warning:: (#17320)
This commit is contained in:
parent
eb07a5a75b
commit
9819fb21d8
15 changed files with 84 additions and 88 deletions
|
|
@ -207,7 +207,7 @@ proc getProtoByName*(name: string): int {.since: (1, 3, 5).} =
|
|||
let protoent = winlean.getprotobyname(name.cstring)
|
||||
else:
|
||||
let protoent = posix.getprotobyname(name.cstring)
|
||||
|
||||
|
||||
if protoent == nil:
|
||||
raise newException(OSError, "protocol not found")
|
||||
|
||||
|
|
@ -280,7 +280,7 @@ proc getAddrInfo*(address: string, port: Port, domain: Domain = AF_INET,
|
|||
protocol: Protocol = IPPROTO_TCP): ptr AddrInfo =
|
||||
##
|
||||
##
|
||||
## **Warning**: The resulting `ptr AddrInfo` must be freed using `freeAddrInfo`!
|
||||
## .. warning:: The resulting `ptr AddrInfo` must be freed using `freeAddrInfo`!
|
||||
var hints: AddrInfo
|
||||
result = nil
|
||||
hints.ai_family = toInt(domain)
|
||||
|
|
@ -492,7 +492,7 @@ proc getAddrString*(sockAddr: ptr SockAddr): string =
|
|||
proc getAddrString*(sockAddr: ptr SockAddr, strAddress: var string) =
|
||||
## Stores in `strAddress` the string representation of the address inside
|
||||
## `sockAddr`
|
||||
##
|
||||
##
|
||||
## **Note**
|
||||
## * `strAddress` must be initialized to 46 in length.
|
||||
assert(46 == len(strAddress),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue