From 8e27bddb97cb5629c35807c81ead3da58a09ebcc Mon Sep 17 00:00:00 2001 From: Araq Date: Fri, 26 Apr 2019 20:33:58 +0200 Subject: newruntime: make 'discard new RootObj' work --- lib/core/runtime_v2.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/core') diff --git a/lib/core/runtime_v2.nim b/lib/core/runtime_v2.nim index 8a1e45741..0165833b4 100644 --- a/lib/core/runtime_v2.nim +++ b/lib/core/runtime_v2.nim @@ -48,7 +48,7 @@ proc nimNewObj(size: int): pointer {.compilerRtl.} = discard elif defined(useMalloc): var orig = c_malloc(s) - nimZeroMem(result, s) + nimZeroMem(orig, s) result = orig +! sizeof(RefHeader) else: result = alloc0(s) +! sizeof(RefHeader) -- cgit 1.4.1-2-gfad0 2c7daaef094b5c9d5360'>this commit mirror of ~rjarry's aerc fork - a pretty good email clientakspecs <akspecs@tilde.institute>
summary refs log blame commit diff stats
path: root/lib/history.go
blob: abc081f93d089e1ccd37b360b53bb32076348cc4 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13