Revert "Fixes #12187 (#12321)" (#12447)

This reverts commit 00c31e8766.
This commit is contained in:
Andreas Rumpf 2019-10-18 15:59:22 +02:00 • committed by GitHub
commit 889b745b2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 21 additions and 44 deletions

View file

@ -10,7 +10,7 @@ when useLibC:
proc nimCopyMem*(dest, source: pointer, size: Natural) {.nonReloadable, compilerproc, inline.} =
when useLibC:
c_memcpy(dest, source, csize size)
c_memcpy(dest, source, size)
else:
let d = cast[ptr UncheckedArray[byte]](dest)
let s = cast[ptr UncheckedArray[byte]](source)
@ -21,7 +21,7 @@ proc nimCopyMem*(dest, source: pointer, size: Natural) {.nonReloadable, compiler
proc nimSetMem*(a: pointer, v: cint, size: Natural) {.nonReloadable, inline.} =
when useLibC:
c_memset(a, v, csize size)
c_memset(a, v, size)
else:
let a = cast[ptr UncheckedArray[byte]](a)
var i = 0
@ -35,7 +35,7 @@ proc nimZeroMem*(p: pointer, size: Natural) {.compilerproc, nonReloadable, inlin
proc nimCmpMem*(a, b: pointer, size: Natural): cint {.compilerproc, nonReloadable, inline.} =
when useLibC:
c_memcmp(a, b, csize size)
c_memcmp(a, b, size)
else:
let a = cast[ptr UncheckedArray[byte]](a)
let b = cast[ptr UncheckedArray[byte]](b)