mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Add io.Error to fmt.fprintf_typeid
This commit is contained in:
+4
-6
@@ -75,15 +75,13 @@ fprintf :: proc(fd: os.Handle, fmt: string, args: ..any) -> int {
|
|||||||
w := io.to_writer(os.stream_from_handle(fd))
|
w := io.to_writer(os.stream_from_handle(fd))
|
||||||
return wprintf(w, fmt, ..args)
|
return wprintf(w, fmt, ..args)
|
||||||
}
|
}
|
||||||
fprint_type :: proc(fd: os.Handle, info: ^runtime.Type_Info) -> int {
|
fprint_type :: proc(fd: os.Handle, info: ^runtime.Type_Info) -> (n: int, err: io.Error) {
|
||||||
w := io.to_writer(os.stream_from_handle(fd))
|
w := io.to_writer(os.stream_from_handle(fd))
|
||||||
n, _ := wprint_type(w, info)
|
return wprint_type(w, info)
|
||||||
return n
|
|
||||||
}
|
}
|
||||||
fprint_typeid :: proc(fd: os.Handle, id: typeid) -> int {
|
fprint_typeid :: proc(fd: os.Handle, id: typeid) -> (n: int, err: io.Error) {
|
||||||
w := io.to_writer(os.stream_from_handle(fd))
|
w := io.to_writer(os.stream_from_handle(fd))
|
||||||
n, _ := wprint_typeid(w, id)
|
return wprint_typeid(w, id)
|
||||||
return n
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// print* procedures return the number of bytes written
|
// print* procedures return the number of bytes written
|
||||||
|
|||||||
Reference in New Issue
Block a user