about summary refs log tree commit diff stats
path: root/src/io/bufstream.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-03-12 14:09:53 +0100
committerbptato <nincsnevem662@gmail.com>2024-03-12 14:09:53 +0100
commit0cc8f357d8f44fcfccd141c078d34ed4530fec5b (patch)
treed07478d4895e9ae008d4d0cba704db3f6bd4ecbf /src/io/bufstream.nim
parent2ac31dd859c84697d108c88dd1b22b5ffa5beb95 (diff)
downloadchawan-0cc8f357d8f44fcfccd141c078d34ed4530fec5b.tar.gz
io: add dynstream
a new abstraction that we derive posixstream from; hopefully with time
we can get rid of std/streams
Diffstat (limited to 'src/io/bufstream.nim')
-rw-r--r--src/io/bufstream.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/io/bufstream.nim b/src/io/bufstream.nim
index eb9d6d6b..0558b61c 100644
--- a/src/io/bufstream.nim
+++ b/src/io/bufstream.nim
@@ -1,7 +1,8 @@
+import io/dynstream
 import io/posixstream
 
 type
-  BufStream* = ref object of PosixStream
+  BufStream* = ref object of DynStream
     source*: PosixStream
     registerFun: proc(fd: int)
     registered: bool
@@ -46,7 +47,6 @@ proc flushWrite*(s: BufStream): bool =
 
 proc newBufStream*(ps: PosixStream, registerFun: proc(fd: int)): BufStream =
   result = BufStream(
-    fd: ps.fd,
     source: ps,
     blocking: ps.blocking,
     registerFun: registerFun