From 8e1313d237cfbfff4aff751554c7c09ad1bf34c9 Mon Sep 17 00:00:00 2001 From: Araq Date: Sat, 26 Nov 2011 17:48:42 +0100 Subject: [PATCH] bugfix: tester compiles again --- lib/pure/streams.nim | 2 +- lib/system/sysio.nim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pure/streams.nim b/lib/pure/streams.nim index 6da263d4ad..480d252507 100755 --- a/lib/pure/streams.nim +++ b/lib/pure/streams.nim @@ -170,7 +170,7 @@ proc readLine*(s: PStream, line: var TaintedString): bool = ## ``CRLF``. The newline character(s) are not part of the returned string. ## Returns ``false`` if the end of the file has been reached, ``true`` ## otherwise. If ``false`` is returned `line` contains no new data. - line.setLen(0) + line.string.setLen(0) while true: var c = readChar(s) if c == '\c': diff --git a/lib/system/sysio.nim b/lib/system/sysio.nim index adf9256fe6..890f526ea5 100755 --- a/lib/system/sysio.nim +++ b/lib/system/sysio.nim @@ -42,7 +42,7 @@ proc raiseEIO(msg: string) {.noinline, noreturn.} = proc readLine(f: TFile, line: var TaintedString): bool = # of course this could be optimized a bit; but IO is slow anyway... # and it was difficult to get this CORRECT with Ansi C's methods - setLen(line, 0) # reuse the buffer! + setLen(line.string, 0) # reuse the buffer! while True: var c = fgetc(f) if c < 0'i32: