removed newString proc again, reverted some unnecesary changes

This commit is contained in:
Arne Döring 2017-06-06 21:19:50 +02:00
commit ddea990a70
8 changed files with 16 additions and 38 deletions

View file

@ -16,9 +16,9 @@ proc reprInt(x: int64): string {.compilerproc.} = return $x
proc reprFloat(x: float): string {.compilerproc.} = return $x
proc reprPointer(x: pointer): string {.compilerproc.} =
result = newString(60)
let newLen = c_sprintf(result[0].addr, "%p", x)
result.setLen newLen
var buf: array[60, char]
discard c_sprintf(result[0].addr, "%p", x)
result = $buf.cstring
proc `$`(x: uint64): string =
if x == 0: