From 9673e4f2df941bfeeb3e1fe8e66d89fddea1145b Mon Sep 17 00:00:00 2001 From: Araq Date: Fri, 1 Aug 2014 23:40:48 +0200 Subject: progress on deepCopy --- lib/system.nim | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lib/system.nim') diff --git a/lib/system.nim b/lib/system.nim index 753205777..3e4d3fb9e 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -2997,10 +2997,13 @@ proc locals*(): TObject {.magic: "Locals", noSideEffect.} = ## # -> B is 1 discard -proc deepCopy*[T](x: T): T {.magic: "DeepCopy", noSideEffect.} = - ## performs a deep copy of `x`. This is also used by the code generator - ## for the implementation of ``spawn``. - discard +when hostOS != "standalone" and not defined(NimrodVM) and not defined(JS): + proc deepCopy*[T](x: var T, y: T) {.noSideEffect, magic: "DeepCopy".} = + ## performs a deep copy of `x`. This is also used by the code generator + ## for the implementation of ``spawn``. + discard + + include "system/deepcopy" {.pop.} #{.push warning[GcMem]: off.} -- cgit 1.4.1-2-gfad0