summary refs log tree commit diff stats
path: root/lib/system/arc.nim
diff options
context:
space:
mode:
authorAntonis Geralis <43617260+planetis-m@users.noreply.github.com>2020-10-28 18:54:42 +0200
committerGitHub <noreply@github.com>2020-10-28 17:54:42 +0100
commit94e2b9e83725d8bcaa43f4bb3e64b8c79d3bec95 (patch)
tree582c1714d5318269f603afdf2afc6bc6a37d146c /lib/system/arc.nim
parent610e9b2fe9d5908b9941939e975f394aba009b43 (diff)
downloadNim-94e2b9e83725d8bcaa43f4bb3e64b8c79d3bec95.tar.gz
Make newObjUninit proc to adhere to its name (#15764)
Co-authored-by: b3liever <b3liever@yandex.com>
Diffstat (limited to 'lib/system/arc.nim')
-rw-r--r--lib/system/arc.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/system/arc.nim b/lib/system/arc.nim
index 0eecadd66..4c97f1aa0 100644
--- a/lib/system/arc.nim
+++ b/lib/system/arc.nim
@@ -99,7 +99,7 @@ proc nimNewObjUninit(size, alignment: int): pointer {.compilerRtl.} =
   when defined(nimscript):
     discard
   else:
-    result = cast[ptr RefHeader](alignedAlloc0(s, alignment) +! hdrSize)
+    result = cast[ptr RefHeader](alignedAlloc(s, alignment) +! hdrSize)
   head(result).rc = 0
   when defined(gcOrc):
     head(result).rootIdx = 0
@@ -165,7 +165,7 @@ template dispose*[T](x: owned(ref T)) = nimRawDispose(cast[pointer](x), T.alignO
 
 proc nimDestroyAndDispose(p: pointer) {.compilerRtl, raises: [].} =
   let rti = cast[ptr PNimTypeV2](p)
-  if rti.destructor != nil: 
+  if rti.destructor != nil:
     cast[DestructorProc](rti.destructor)(p)
   when false:
     cstderr.rawWrite cast[ptr PNimTypeV2](p)[].name