mirror of https://github.com/vacp2p/nim-libp2p.git
add side effect annotations (#197)
This commit is contained in:
parent
37b98ad45c
commit
88dbeebf17
|
@ -24,17 +24,17 @@ type
|
||||||
|
|
||||||
MultiBase* = object
|
MultiBase* = object
|
||||||
|
|
||||||
MBCodeSize = proc(length: int): int {.nimcall, raises: [Defect].}
|
MBCodeSize = proc(length: int): int {.nimcall, gcsafe, noSideEffect, raises: [Defect].}
|
||||||
|
|
||||||
MBCodec = object
|
MBCodec = object
|
||||||
code: char
|
code: char
|
||||||
name: string
|
name: string
|
||||||
encr: proc(inbytes: openarray[byte],
|
encr: proc(inbytes: openarray[byte],
|
||||||
outbytes: var openarray[char],
|
outbytes: var openarray[char],
|
||||||
outlen: var int): MultibaseStatus {.nimcall, raises: [Defect].}
|
outlen: var int): MultibaseStatus {.nimcall, gcsafe, noSideEffect, raises: [Defect].}
|
||||||
decr: proc(inbytes: openarray[char],
|
decr: proc(inbytes: openarray[char],
|
||||||
outbytes: var openarray[byte],
|
outbytes: var openarray[byte],
|
||||||
outlen: var int): MultibaseStatus {.nimcall, raises: [Defect].}
|
outlen: var int): MultibaseStatus {.nimcall, gcsafe, noSideEffect, raises: [Defect].}
|
||||||
encl: MBCodeSize
|
encl: MBCodeSize
|
||||||
decl: MBCodeSize
|
decl: MBCodeSize
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ const
|
||||||
|
|
||||||
type
|
type
|
||||||
MHashCoderProc* = proc(data: openarray[byte],
|
MHashCoderProc* = proc(data: openarray[byte],
|
||||||
output: var openarray[byte]) {.nimcall, gcsafe, raises: [Defect].}
|
output: var openarray[byte]) {.nimcall, gcsafe, noSideEffect, raises: [Defect].}
|
||||||
MHash* = object
|
MHash* = object
|
||||||
mcodec*: MultiCodec
|
mcodec*: MultiCodec
|
||||||
size*: int
|
size*: int
|
||||||
|
|
|
@ -13,7 +13,7 @@ import vbuffer
|
||||||
type
|
type
|
||||||
Transcoder* = object
|
Transcoder* = object
|
||||||
stringToBuffer*: proc(s: string,
|
stringToBuffer*: proc(s: string,
|
||||||
vb: var VBuffer): bool {.nimcall, gcsafe, raises: [Defect].}
|
vb: var VBuffer): bool {.nimcall, gcsafe, noSideEffect, raises: [Defect].}
|
||||||
bufferToString*: proc(vb: var VBuffer,
|
bufferToString*: proc(vb: var VBuffer,
|
||||||
s: var string): bool {.nimcall, gcsafe, raises: [Defect].}
|
s: var string): bool {.nimcall, gcsafe, noSideEffect, raises: [Defect].}
|
||||||
validateBuffer*: proc(vb: var VBuffer): bool {.nimcall, gcsafe, raises: [Defect].}
|
validateBuffer*: proc(vb: var VBuffer): bool {.nimcall, gcsafe, noSideEffect, raises: [Defect].}
|
||||||
|
|
Loading…
Reference in New Issue