diff options
| author | gingerBill <bill@gingerbill.org> | 2022-09-15 10:00:50 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-09-15 10:00:50 +0100 |
| commit | f50fc33749d550187a41b62f203c33549073fbf3 (patch) | |
| tree | f34732c0db5b9be5bcb7e50da9ab09720f8b6ac4 /core/bytes/buffer.odin | |
| parent | 1e595f2e2697342e82af7cae6682378a64ae5897 (diff) | |
Clean up of the core library to make the stream vtables not be pointers directly.
Diffstat (limited to 'core/bytes/buffer.odin')
| -rw-r--r-- | core/bytes/buffer.odin | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/bytes/buffer.odin b/core/bytes/buffer.odin index 96f057a9b..d9f195871 100644 --- a/core/bytes/buffer.odin +++ b/core/bytes/buffer.odin @@ -374,12 +374,12 @@ buffer_read_from :: proc(b: ^Buffer, r: io.Reader) -> (n: i64, err: io.Error) #n buffer_to_stream :: proc(b: ^Buffer) -> (s: io.Stream) { s.stream_data = b - s.stream_vtable = _buffer_vtable + s.stream_vtable = &_buffer_vtable return } @(private) -_buffer_vtable := &io.Stream_VTable{ +_buffer_vtable := io.Stream_VTable{ impl_size = proc(s: io.Stream) -> i64 { b := (^Buffer)(s.stream_data) return i64(buffer_capacity(b)) |