From 4b147d64a05c7995fe9764d5f94fd09829a68d9f Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Sat, 11 Apr 2020 23:35:49 +0300 Subject: [PATCH] Allow constructing derived stream types with custom pageSize --- faststreams/output_stream.nim | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/faststreams/output_stream.nim b/faststreams/output_stream.nim index 2cb8e8b..143bcdb 100644 --- a/faststreams/output_stream.nim +++ b/faststreams/output_stream.nim @@ -13,7 +13,7 @@ type pages: Deque[OutputPage] endPos: int extCursorsCount: int - pageSize: int + pageSize*: int maxWriteSize*: int minWriteSize*: int @@ -111,8 +111,7 @@ proc memoryOutput*(pageSize = defaultPageSize): OutputStreamHandle = var stream = OutputStream( pageSize: pageSize, minWriteSize: 1, - maxWriteSize: high(int), - pages: initDeque[OutputPage]()) + maxWriteSize: high(int)) stream.initWithSinglePage() @@ -166,7 +165,6 @@ proc fileOutput*(filename: string, pageSize: pageSize, minWriteSize: 1, maxWriteSize: high(int), - pages: initDeque[OutputPage](), file: f) stream.initWithSinglePage()