summary refs log tree commit diff stats
path: root/lib/repr.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/repr.nim')
-rw-r--r--lib/repr.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/repr.nim b/lib/repr.nim
index 35c5f9f42..765d66be0 100644
--- a/lib/repr.nim
+++ b/lib/repr.nim
@@ -104,7 +104,7 @@ proc reprSet(p: pointer, typ: PNimType): string {.compilerproc.} =
 type
   TReprClosure {.final.} = object # we cannot use a global variable here
                                   # as this wouldn't be thread-safe
-    marked: TCellSeq
+    marked: TCellSet
     recdepth: int       # do not recurse endless
     indent: int         # indentation
 
@@ -171,14 +171,14 @@ proc reprRecord(result: var string, p: pointer, typ: PNimType,
 proc reprRef(result: var string, p: pointer, typ: PNimType,
              cl: var TReprClosure) =
   # we know that p is not nil here:
-  when defined(boehmGC):
+  when defined(boehmGC) or defined(nogc):
     var cell = cast[PCell](p)
   else:
     var cell = usrToCell(p)
   add result, "ref " & reprPointer(p)
   if cell notin cl.marked:
     # only the address is shown:
-    add(cl.marked, cell)
+    incl(cl.marked, cell)
     add result, " --> "
     reprAux(result, p, typ.base, cl)