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