diff options
author | patrick dw <algorithicimperative@gmail.com> | 2015-06-19 18:50:01 -0500 |
---|---|---|
committer | patrick dw <algorithicimperative@gmail.com> | 2015-06-19 18:50:01 -0500 |
commit | 1cdbd6b0a5865ba3ecb685c82338df1482aa118b (patch) | |
tree | e2270f27d17d8f3f73baab206562d0ca695b44d2 /lib/pure | |
parent | 2a0f7b5de72dc1d8c1018bb60630764f765376bb (diff) | |
download | Nim-1cdbd6b0a5865ba3ecb685c82338df1482aa118b.tar.gz |
reworked deprecation to retain old procs
Diffstat (limited to 'lib/pure')
-rw-r--r-- | lib/pure/streams.nim | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/pure/streams.nim b/lib/pure/streams.nim index 15022fe0d..8aa8d35d8 100644 --- a/lib/pure/streams.nim +++ b/lib/pure/streams.nim @@ -117,14 +117,17 @@ proc write*(s: Stream, x: string) = ## terminating zero is written. writeData(s, cstring(x), x.len) +proc writeLn*(s: Stream, args: varargs[string, `$`]) {.deprecated.} = + ## **Deprecated since version 0.11.4:** Use **writeLine** instead. + for str in args: write(s, str) + write(s, "\n") + proc writeLine*(s: Stream, args: varargs[string, `$`]) = ## writes one or more strings to the the stream `s` followed ## by a new line. No length field or terminating zero is written. for str in args: write(s, str) write(s, "\n") -{.deprecated: [writeln:writeLine].} - proc read[T](s: Stream, result: var T) = ## generic read procedure. Reads `result` from the stream `s`. if readData(s, addr(result), sizeof(T)) != sizeof(T): |