summary refs log tree commit diff stats
path: root/lib/system/debugger.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-06-24 17:15:54 +0200
committerAraq <rumpf_a@web.de>2012-06-24 17:15:54 +0200
commitd257f7fd36e594803fc1605d46dcf1e654f0e48b (patch)
treeff2e0383e607a558630d8cd3e5d377284fe7d91f /lib/system/debugger.nim
parent869a5aa90d91fae1e522b69cf5bf4cc330d54a23 (diff)
downloadNim-d257f7fd36e594803fc1605d46dcf1e654f0e48b.tar.gz
tests/gc/gcleak4.nim
Diffstat (limited to 'lib/system/debugger.nim')
-rwxr-xr-xlib/system/debugger.nim7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/system/debugger.nim b/lib/system/debugger.nim
index 564f080d1..ca60b0405 100755
--- a/lib/system/debugger.nim
+++ b/lib/system/debugger.nim
@@ -632,7 +632,12 @@ proc genericHashAux(dest: Pointer, mt: PNimType, shallow: bool,
     else:
       result = h
       var s = cast[ppointer](dest)[]
-      if s != nil: result = genericHashAux(s, mt.base, shallow, result)
+      if s != nil:
+        result = result !& genericHashAux(s, mt.base, shallow, result)
+        # hash the object header:
+        #const headerSize = sizeof(int)*2
+        #result = result !& hash(cast[pointer](cast[int](s) -% headerSize),
+        #                        headerSize)
   else:
     result = h !& hash(dest, mt.size) # hash raw bits