mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 14:48:47 +00:00
Minor fixes
This commit is contained in:
@@ -44,7 +44,7 @@ when ODIN_OS == .Windows {
|
|||||||
@(link_name="_Cnd_destroy") cnd_destroy :: proc(cond: ^cnd_t) ---
|
@(link_name="_Cnd_destroy") cnd_destroy :: proc(cond: ^cnd_t) ---
|
||||||
@(link_name="_Cnd_init") cnd_init :: proc(cond: ^cnd_t) -> int ---
|
@(link_name="_Cnd_init") cnd_init :: proc(cond: ^cnd_t) -> int ---
|
||||||
@(link_name="_Cnd_signal") cnd_signal :: proc(cond: ^cnd_t) -> int ---
|
@(link_name="_Cnd_signal") cnd_signal :: proc(cond: ^cnd_t) -> int ---
|
||||||
@(link_name="_Cnd_timedwait") cnd_timedwait :: proc(cond: ^cnd_t, ts: ^timespec) -> int ---
|
@(link_name="_Cnd_timedwait") cnd_timedwait :: proc(cond: ^cnd_t, mtx: ^mtx_t, ts: ^timespec) -> int ---
|
||||||
@(link_name="_Cnd_wait") cnd_wait :: proc(cond: ^cnd_t, mtx: ^mtx_t) -> int ---
|
@(link_name="_Cnd_wait") cnd_wait :: proc(cond: ^cnd_t, mtx: ^mtx_t) -> int ---
|
||||||
|
|
||||||
// 7.26.4 Mutex functions
|
// 7.26.4 Mutex functions
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ builder_init :: proc{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@(private)
|
@(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) {
|
impl_write = proc(s: io.Stream, p: []byte) -> (n: int, err: io.Error) {
|
||||||
b := (^Builder)(s.stream_data)
|
b := (^Builder)(s.stream_data)
|
||||||
n = write_bytes(b, p)
|
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
|
// return an `io.Stream` from a builder
|
||||||
to_stream :: proc(b: ^Builder) -> io.Stream {
|
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
|
// return an `io.Writer` from a builder
|
||||||
|
|||||||
Reference in New Issue
Block a user