diff options
author | Arne Döring <arne.doering@gmx.net> | 2019-11-07 17:16:34 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-11-07 17:16:34 +0100 |
commit | a2d6691af290e4500fff727136ada2b99609d896 (patch) | |
tree | 46590172fde35dc5e7355c1e57ff2bd54eda798c /lib/system | |
parent | 8b1ef8e07ee73241c5da3d1d7a8d2b2aae5b7d42 (diff) | |
download | Nim-a2d6691af290e4500fff727136ada2b99609d896.tar.gz |
fix #12597 (#12604)
Diffstat (limited to 'lib/system')
-rw-r--r-- | lib/system/gc_regions.nim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/system/gc_regions.nim b/lib/system/gc_regions.nim index b7d1d302b..963fc7b78 100644 --- a/lib/system/gc_regions.nim +++ b/lib/system/gc_regions.nim @@ -378,13 +378,13 @@ proc asgnRefNoCycle(dest: PPointer, src: pointer) {.compilerproc, inline, deprecated: "old compiler compat".} = asgnRef(dest, src) proc alloc(size: Natural): pointer = - result = c_malloc(size) + result = c_malloc(cast[csize_t](size)) if result == nil: raiseOutOfMem() proc alloc0(size: Natural): pointer = result = alloc(size) zeroMem(result, size) proc realloc(p: pointer, newsize: Natural): pointer = - result = c_realloc(p, newsize) + result = c_realloc(p, cast[csize_t](newsize)) if result == nil: raiseOutOfMem() proc dealloc(p: pointer) = c_free(p) @@ -401,13 +401,13 @@ proc alloc(r: var MemRegion; size: Natural): pointer = proc dealloc(r: var MemRegion; p: pointer) = dealloc(p) proc allocShared(size: Natural): pointer = - result = c_malloc(size) + result = c_malloc(cast[csize_t](size)) if result == nil: raiseOutOfMem() proc allocShared0(size: Natural): pointer = result = alloc(size) zeroMem(result, size) proc reallocShared(p: pointer, newsize: Natural): pointer = - result = c_realloc(p, newsize) + result = c_realloc(p, cast[csize_t](newsize)) if result == nil: raiseOutOfMem() proc deallocShared(p: pointer) = c_free(p) |