summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorYuriy Glukhov <yuriy.glukhov@gmail.com>2015-08-03 14:11:48 +0300
committerYuriy Glukhov <yuriy.glukhov@gmail.com>2015-08-03 14:11:48 +0300
commit436b847a7ecc0b4ce5a7952ea9e6af846a0d5491 (patch)
treee2b794d085f17e950be5c49463f93cfabf93e9fe
parente1913abdd4a397ad21aa2452c75e82e163df0c20 (diff)
downloadNim-436b847a7ecc0b4ce5a7952ea9e6af846a0d5491.tar.gz
Workaround for #3179.
-rw-r--r--lib/system.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/system.nim b/lib/system.nim
index 383002fcf..85d16708c 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -1490,7 +1490,7 @@ when not defined(nimrodVM):
       ## containing zero, so it is somewhat safer than ``createU``.
       ## The allocated memory belongs to its allocating thread!
       ## Use `createShared` to allocate from a shared heap.
-      cast[ptr T](alloc0(T.sizeof * size))
+      cast[ptr T](alloc0(sizeof(T) * size))
     proc realloc*(p: pointer, newSize: Natural): pointer {.noconv, rtl, tags: [],
                                                            benign.}
       ## grows or shrinks a given memory block. If p is **nil** then a new