summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorNotkea <pacien@users.noreply.github.com>2019-01-09 15:06:40 +0100
committergenotrance <dev@genotrance.com>2019-01-09 08:06:40 -0600
commit11050d110461edc3646a66b8afefb7907187f78c (patch)
treebc365587d57277952c38a9944c2354dcd5845e64 /lib/pure
parent0229dfd1997ef9a2229c144a875fe51db206fdcd (diff)
downloadNim-11050d110461edc3646a66b8afefb7907187f78c.tar.gz
make Stream.{read,peek} procs public (#9806)
Those are useful in generic code, and `proc write*[T](s: Stream, x: T)` was already public.
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/streams.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/streams.nim b/lib/pure/streams.nim
index b0ac62525..b5254b4f7 100644
--- a/lib/pure/streams.nim
+++ b/lib/pure/streams.nim
@@ -146,12 +146,12 @@ proc writeLine*(s: Stream, args: varargs[string, `$`]) =
   for str in args: write(s, str)
   write(s, "\n")
 
-proc read[T](s: Stream, result: var T) =
+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):
     raise newEIO("cannot read from stream")
 
-proc peek[T](s: Stream, result: var T) =
+proc peek*[T](s: Stream, result: var T) =
   ## generic peek procedure. Peeks `result` from the stream `s`.
   if peekData(s, addr(result), sizeof(T)) != sizeof(T):
     raise newEIO("cannot read from stream")