diff --git a/libp2p/multibase.nim b/libp2p/multibase.nim index f5f824d70..8d392f1b7 100644 --- a/libp2p/multibase.nim +++ b/libp2p/multibase.nim @@ -11,7 +11,7 @@ ## ## TODO: ## 1. base32z -## +## {.push raises: [Defect].} @@ -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 diff --git a/libp2p/multihash.nim b/libp2p/multihash.nim index bc0f9285d..4d7d066d9 100644 --- a/libp2p/multihash.nim +++ b/libp2p/multihash.nim @@ -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 diff --git a/libp2p/transcoder.nim b/libp2p/transcoder.nim index 3d9714092..c9f35cc5c 100644 --- a/libp2p/transcoder.nim +++ b/libp2p/transcoder.nim @@ -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].}