aboutsummaryrefslogtreecommitdiff
path: root/core/bytes/reader.odin
diff options
context:
space:
mode:
Diffstat (limited to 'core/bytes/reader.odin')
-rw-r--r--core/bytes/reader.odin3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/bytes/reader.odin b/core/bytes/reader.odin
index 4b18345ba..a2e3294f0 100644
--- a/core/bytes/reader.odin
+++ b/core/bytes/reader.odin
@@ -9,10 +9,11 @@ Reader :: struct {
prev_rune: int, // previous reading index of rune or < 0
}
-reader_init :: proc(r: ^Reader, s: []byte) {
+reader_init :: proc(r: ^Reader, s: []byte) -> io.Stream {
r.s = s
r.i = 0
r.prev_rune = -1
+ return reader_to_stream(r)
}
reader_to_stream :: proc(r: ^Reader) -> (s: io.Stream) {