add side effect annotations (#197)

This commit is contained in:
Jacek Sieka 2020-06-01 09:25:16 +02:00 committed by GitHub
parent 37b98ad45c
commit 88dbeebf17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View File

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

View File

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

View File

@ -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].}