summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--lib/system/repr.nim2
-rw-r--r--tests/gc/gctest.nim2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/system/repr.nim b/lib/system/repr.nim
index 172b4c08c..58c86b0db 100644
--- a/lib/system/repr.nim
+++ b/lib/system/repr.nim
@@ -17,7 +17,7 @@ proc reprFloat(x: float): string {.compilerproc.} = return $x
 
 proc reprPointer(x: pointer): string {.compilerproc.} =
   var buf: array[60, char]
-  discard c_sprintf(result[0].addr, "%p", x)
+  discard c_sprintf(buf.cstring, "%p", x)
   result = $buf.cstring
 
 proc `$`(x: uint64): string =
diff --git a/tests/gc/gctest.nim b/tests/gc/gctest.nim
index b3b9af608..f5c81f033 100644
--- a/tests/gc/gctest.nim
+++ b/tests/gc/gctest.nim
@@ -31,7 +31,7 @@ type
     of nkList: sons: seq[PCaseNode]
     else: unused: seq[string]
 
-  TIdObj* = object of TObject
+  TIdObj* = object of RootObj
     id*: int  # unique id; use this for comparisons and not the pointers
 
   PIdObj* = ref TIdObj