diff options
| author | gingerBill <bill@gingerbill.org> | 2023-03-16 13:35:38 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2023-03-16 13:35:38 +0000 |
| commit | e05944601a07e6cb9c0ec84f80ca4ca3511c84ea (patch) | |
| tree | 79737628ab43980caa1c618c079bf0873f284c2e /core/strings | |
| parent | 49cf0125a936bdc5406ec7dcb0837470992f676c (diff) | |
Minor fixes
Diffstat (limited to 'core/strings')
| -rw-r--r-- | core/strings/builder.odin | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/strings/builder.odin b/core/strings/builder.odin index 02177ba8c..a6d5b78b4 100644 --- a/core/strings/builder.odin +++ b/core/strings/builder.odin @@ -67,7 +67,7 @@ builder_init :: proc{ } @(private) -_builder_stream_vtable := io.Stream_VTable{ +_builder_stream_vtable_obj := io.Stream_VTable{ impl_write = proc(s: io.Stream, p: []byte) -> (n: int, err: io.Error) { b := (^Builder)(s.stream_data) n = write_bytes(b, p) @@ -95,9 +95,13 @@ _builder_stream_vtable := io.Stream_VTable{ }, } +// NOTE(dweiler): Work around a miscompilation bug on Linux still. +@(private) +_builder_stream_vtable := &_builder_stream_vtable_obj + // return an `io.Stream` from a builder to_stream :: proc(b: ^Builder) -> io.Stream { - return io.Stream{stream_vtable=&_builder_stream_vtable, stream_data=b} + return io.Stream{stream_vtable=_builder_stream_vtable, stream_data=b} } // return an `io.Writer` from a builder |