diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2023-06-23 12:12:17 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-23 12:12:17 +0100 |
| commit | 19ea0906332e6185cd0eefe873179b9058ccd725 (patch) | |
| tree | 807540705d576d1153c67219f06b6c6fe785b461 /core/compress | |
| parent | 9841b11a5423e2cba67c19fbd06e28732d36109c (diff) | |
| parent | a78d6fe0b39d57f002a397d54bb506df7a3d2f1b (diff) | |
Merge pull request #2584 from odin-lang/new-io
New and Improved `io.Stream` interface
Diffstat (limited to 'core/compress')
| -rw-r--r-- | core/compress/common.odin | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/compress/common.odin b/core/compress/common.odin index 6bcc46bf2..bc56229c2 100644 --- a/core/compress/common.odin +++ b/core/compress/common.odin @@ -188,7 +188,8 @@ input_size_from_memory :: proc(z: ^Context_Memory_Input) -> (res: i64, err: Erro } input_size_from_stream :: proc(z: ^Context_Stream_Input) -> (res: i64, err: Error) { - return io.size(z.input), nil + res, _ = io.size(z.input) + return } input_size :: proc{input_size_from_memory, input_size_from_stream} @@ -215,7 +216,7 @@ read_slice_from_stream :: #force_inline proc(z: ^Context_Stream_Input, size: int // TODO: REMOVE ALL USE OF context.temp_allocator here // the is literally no need for it b := make([]u8, size, context.temp_allocator) - _, e := z.input->impl_read(b[:]) + _, e := io.read(z.input, b[:]) if e == .None { return b, .None } |