Use .. warning:: (#17320)

This commit is contained in:
konsumlamm 2021-03-10 19:39:23 +01:00 • committed by GitHub
commit 9819fb21d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 84 additions and 88 deletions

View file

@ -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),