summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rwxr-xr-xlib/system/arithm.nim2
-rwxr-xr-xlib/system/assign.nim16
2 files changed, 12 insertions, 6 deletions
diff --git a/lib/system/arithm.nim b/lib/system/arithm.nim
index 8f036caa5..3efbfa7bb 100755
--- a/lib/system/arithm.nim
+++ b/lib/system/arithm.nim
@@ -240,7 +240,7 @@ elif false: # asmVersion and (defined(gcc) or defined(llvm_gcc)):
             :"%edx"
     """
 
-# Platform independant versions of the above (slower!)
+# Platform independent versions of the above (slower!)
 when not defined(addInt):
   proc addInt(a, b: int): int {.compilerProc, inline.} =
     result = a +% b
diff --git a/lib/system/assign.nim b/lib/system/assign.nim
index 895a7f9fd..cd4a34f6c 100755
--- a/lib/system/assign.nim
+++ b/lib/system/assign.nim
@@ -144,11 +144,17 @@ proc objectInit(dest: Pointer, typ: PNimType) =
   
 # ---------------------- assign zero -----------------------------------------
 
-# dummy declaration; XXX we need 'mixin' here
-proc destroy(x: int) = nil
-proc nimDestroyRange*[T](r: T) =
-  # internal proc used for destroying sequences and arrays
-  for i in countup(0, r.len - 1): destroy(r[i])
+when not defined(nimmixin):
+  proc destroy(x: int) = nil
+  proc nimDestroyRange*[T](r: T) =
+    # internal proc used for destroying sequences and arrays
+    for i in countup(0, r.len - 1): destroy(r[i])
+else:
+  # XXX Why is this exported and no compilerproc?
+  proc nimDestroyRange*[T](r: T) =
+    # internal proc used for destroying sequences and arrays
+    mixin destroy
+    for i in countup(0, r.len - 1): destroy(r[i])
 
 proc genericReset(dest: Pointer, mt: PNimType) {.compilerProc.}
 proc genericResetAux(dest: Pointer, n: ptr TNimNode) =