summary refs log tree commit diff stats
path: root/lib/system.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-02-20 14:29:09 +0100
committerAraq <rumpf_a@web.de>2019-02-20 14:29:18 +0100
commit6c10d331db8c00accc7ac2884ac46c89ef72cc3b (patch)
tree624e9ef15fe85037f6256bc2891031017870d599 /lib/system.nim
parent873539b50da56bbfe4c18283bfe239c29d52e81c (diff)
downloadNim-6c10d331db8c00accc7ac2884ac46c89ef72cc3b.tar.gz
gc:destructors: slightly more stuff compiles
Diffstat (limited to 'lib/system.nim')
-rw-r--r--lib/system.nim5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/system.nim b/lib/system.nim
index e8a04ce9d..71d1458fd 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -2559,7 +2559,10 @@ proc `==`*[T](x, y: seq[T]): bool {.noSideEffect.} =
   else:
     when not defined(JS):
       proc seqToPtr[T](x: seq[T]): pointer {.inline, nosideeffect.} =
-        result = cast[pointer](x)
+        when defined(gcDestructors):
+          result = cast[NimSeqV2[T]](x).p
+        else:
+          result = cast[pointer](x)
 
       if seqToPtr(x) == seqToPtr(y):
         return true