summary refs log tree commit diff stats
path: root/lib/core/allocators.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/core/allocators.nim')
-rw-r--r--lib/core/allocators.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/core/allocators.nim b/lib/core/allocators.nim
index 25df59b63..43aae0111 100644
--- a/lib/core/allocators.nim
+++ b/lib/core/allocators.nim
@@ -43,7 +43,7 @@ proc getLocalAllocator*(): Allocator =
     result = addr allocatorStorage
     result.alloc = proc (a: Allocator; size: int; alignment: int = 8): pointer {.nimcall, raises: [].} =
       when defined(useMalloc) and not defined(nimscript):
-        result = c_malloc(size)
+        result = c_malloc(cuint size)
         # XXX do we need this?
         nimZeroMem(result, size)
       else:
@@ -57,7 +57,7 @@ proc getLocalAllocator*(): Allocator =
       inc a.deallocCount
     result.realloc = proc (a: Allocator; p: pointer; oldSize, newSize: int): pointer {.nimcall, raises: [].} =
       when defined(useMalloc) and not defined(nimscript):
-        result = c_realloc(p, newSize)
+        result = c_realloc(p, cuint newSize)
       else:
         result = system.realloc(p, newSize)
       nimZeroMem(result +! oldSize, newSize - oldSize)