diff options
author | Araq <rumpf_a@web.de> | 2011-09-24 00:46:41 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-09-24 00:46:41 +0200 |
commit | 6023e994fbc949c77abbbe4ffae761ca982732db (patch) | |
tree | 1a2173755edc026cdbae89c7f5ca0bdfdc83a138 /lib/system/sysio.nim | |
parent | 2359b8b1073cfd027ac14a147aba06cc18d61010 (diff) | |
download | Nim-6023e994fbc949c77abbbe4ffae761ca982732db.tar.gz |
beginning of a taint mode; type system enhancements
Diffstat (limited to 'lib/system/sysio.nim')
-rwxr-xr-x | lib/system/sysio.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/system/sysio.nim b/lib/system/sysio.nim index d48e87ae2..56815c0c5 100755 --- a/lib/system/sysio.nim +++ b/lib/system/sysio.nim @@ -55,8 +55,8 @@ proc rawReadLine(f: TFile, result: var string) = break add result, chr(int(c)) -proc readLine(f: TFile): string = - result = "" +proc readLine(f: TFile): TaintedString = + result = TaintedString("") rawReadLine(f, result) proc write(f: TFile, i: int) = @@ -81,7 +81,7 @@ proc write(f: TFile, c: Char) = putc(c, f) proc write(f: TFile, a: openArray[string]) = for x in items(a): write(f, x) -proc readFile(filename: string): string = +proc readFile(filename: string): TaintedString = var f = open(filename) try: var len = getFileSize(f) |