summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/system.nim12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/system.nim b/lib/system.nim
index 45ee5be0b..72d1a3aee 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -264,8 +264,16 @@ proc new*[T](a: var ref T, finalizer: proc (x: ref T) {.nimcall.}) {.
   ## **Note**: The `finalizer` refers to the type `T`, not to the object!
   ## This means that for each object of type `T` the finalizer will be called!
 
-proc reset*[T](obj: var T) {.magic: "Reset", noSideEffect.}
-  ## Resets an object `obj` to its initial (binary zero) value.
+when defined(nimV2):
+  proc reset*[T](obj: var T) {.magic: "Destroy", noSideEffect.}
+    ## Old runtime target: Resets an object `obj` to its initial (binary zero) value.
+    ##
+    ## New runtime target: An alias for `=destroy`.
+else:
+  proc reset*[T](obj: var T) {.magic: "Reset", noSideEffect.}
+    ## Old runtime target: Resets an object `obj` to its initial (binary zero) value.
+    ##
+    ## New runtime target: An alias for `=destroy`.
 
 proc wasMoved*[T](obj: var T) {.magic: "WasMoved", noSideEffect.} =
   ## Resets an object `obj` to its initial (binary zero) value to signify