bugfix: tester compiles again

This commit is contained in:
Araq 2011-11-26 17:48:42 +01:00
commit 8e1313d237
2 changed files with 2 additions and 2 deletions

View file

@ -170,7 +170,7 @@ proc readLine*(s: PStream, line: var TaintedString): bool =
## ``CRLF``. The newline character(s) are not part of the returned string. ## ``CRLF``. The newline character(s) are not part of the returned string.
## Returns ``false`` if the end of the file has been reached, ``true`` ## Returns ``false`` if the end of the file has been reached, ``true``
## otherwise. If ``false`` is returned `line` contains no new data. ## otherwise. If ``false`` is returned `line` contains no new data.
line.setLen(0) line.string.setLen(0)
while true: while true:
var c = readChar(s) var c = readChar(s)
if c == '\c': if c == '\c':

View file

@ -42,7 +42,7 @@ proc raiseEIO(msg: string) {.noinline, noreturn.} =
proc readLine(f: TFile, line: var TaintedString): bool = proc readLine(f: TFile, line: var TaintedString): bool =
# of course this could be optimized a bit; but IO is slow anyway... # 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 # 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: while True:
var c = fgetc(f) var c = fgetc(f)
if c < 0'i32: if c < 0'i32: