diff options
author | Araq <rumpf_a@web.de> | 2019-04-22 10:00:54 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2019-04-22 10:00:54 +0200 |
commit | 0194f4346755b4d215cb79625227f7ee46f11f43 (patch) | |
tree | 3cb12661def6993f7b37617b4cf54106802bffe4 | |
parent | 665fcb12dd0eef8637fb573b92a791021ba34740 (diff) | |
download | Nim-0194f4346755b4d215cb79625227f7ee46f11f43.tar.gz |
system.nim: copyMem and friends do not raise any exception
-rw-r--r-- | lib/system.nim | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/system.nim b/lib/system.nim index a04433530..182403e82 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -2239,14 +2239,15 @@ proc addQuitProc*(quitProc: proc() {.noconv.}) {. # not be called explicitly! The user may decide to do this manually though. when not defined(nimscript) and not defined(JS): - proc zeroMem*(p: pointer, size: Natural) {.inline, benign.} + proc zeroMem*(p: pointer, size: Natural) {.inline, noSideEffect, + tags: [], locks: 0, raises: [].} ## Overwrites the contents of the memory at ``p`` with the value 0. ## ## Exactly ``size`` bytes will be overwritten. Like any procedure ## dealing with raw memory this is **unsafe**. proc copyMem*(dest, source: pointer, size: Natural) {.inline, benign, - tags: [], locks: 0.} + tags: [], locks: 0, raises: [].} ## Copies the contents from the memory at ``source`` to the memory ## at ``dest``. ## Exactly ``size`` bytes will be copied. The memory @@ -2254,7 +2255,7 @@ when not defined(nimscript) and not defined(JS): ## memory this is **unsafe**. proc moveMem*(dest, source: pointer, size: Natural) {.inline, benign, - tags: [], locks: 0.} + tags: [], locks: 0, raises: [].} ## Copies the contents from the memory at ``source`` to the memory ## at ``dest``. ## @@ -2263,7 +2264,8 @@ when not defined(nimscript) and not defined(JS): ## and is thus somewhat more safe than ``copyMem``. Like any procedure ## dealing with raw memory this is still **unsafe**, though. - proc equalMem*(a, b: pointer, size: Natural): bool {.inline, noSideEffect, tags: [], locks: 0.} + proc equalMem*(a, b: pointer, size: Natural): bool {.inline, noSideEffect, + tags: [], locks: 0, raises: [].} ## Compares the memory blocks ``a`` and ``b``. ``size`` bytes will ## be compared. ## |