More conflicts during rebase

This commit is contained in:
Jeroen van Rijn
2026-02-08 12:48:41 +01:00
parent c2647673ec
commit 8f4bcf4d31
4 changed files with 9 additions and 9 deletions

View File

@@ -16,7 +16,7 @@ hash_file_by_handle :: proc(
io.Error,
) {
if !load_at_once {
return hash_stream(algorithm, handle.stream, allocator)
return hash_stream(algorithm, os.to_stream(handle), allocator)
}
buf, err := os.read_entire_file(handle, allocator)

View File

@@ -16,7 +16,7 @@ fprint :: proc(f: ^os.File, args: ..any, sep := " ", flush := true) -> int {
b: bufio.Writer
defer bufio.writer_flush(&b)
bufio.writer_init_with_buf(&b, f.stream, buf[:])
bufio.writer_init_with_buf(&b, os.to_stream(f), buf[:])
w := bufio.writer_to_writer(&b)
return wprint(w, ..args, sep=sep, flush=flush)
}
@@ -27,7 +27,7 @@ fprintln :: proc(f: ^os.File, args: ..any, sep := " ", flush := true) -> int {
b: bufio.Writer
defer bufio.writer_flush(&b)
bufio.writer_init_with_buf(&b, f.stream, buf[:])
bufio.writer_init_with_buf(&b, os.to_stream(f), buf[:])
w := bufio.writer_to_writer(&b)
return wprintln(w, ..args, sep=sep, flush=flush)
@@ -38,7 +38,7 @@ fprintf :: proc(f: ^os.File, fmt: string, args: ..any, flush := true, newline :=
b: bufio.Writer
defer bufio.writer_flush(&b)
bufio.writer_init_with_buf(&b, f.stream, buf[:])
bufio.writer_init_with_buf(&b, os.to_stream(f), buf[:])
w := bufio.writer_to_writer(&b)
return wprintf(w, fmt, ..args, flush=flush, newline=newline)
@@ -52,7 +52,7 @@ fprint_type :: proc(f: ^os.File, info: ^runtime.Type_Info, flush := true) -> (n:
b: bufio.Writer
defer bufio.writer_flush(&b)
bufio.writer_init_with_buf(&b, f.stream, buf[:])
bufio.writer_init_with_buf(&b, os.to_stream(f), buf[:])
w := bufio.writer_to_writer(&b)
return wprint_type(w, info, flush=flush)
@@ -62,7 +62,7 @@ fprint_typeid :: proc(f: ^os.File, id: typeid, flush := true) -> (n: int, err: i
b: bufio.Writer
defer bufio.writer_flush(&b)
bufio.writer_init_with_buf(&b, f.stream, buf[:])
bufio.writer_init_with_buf(&b, os.to_stream(f), buf[:])
w := bufio.writer_to_writer(&b)
return wprint_typeid(w, id, flush=flush)

View File

@@ -23,7 +23,7 @@ package net
@(require)
import "base:runtime"
import os "core:os/os2"
import "core:bufio"
import "core:io"
import "core:math/rand"

View File

@@ -219,8 +219,8 @@ runner :: proc(internal_tests: []Internal_Test) -> bool {
}
}
stdout := os.stdout.stream
stderr := os.stderr.stream
stdout := os.to_stream(os.stdout)
stderr := os.to_stream(os.stderr)
// The animations are only ever shown through STDOUT;
// STDERR is used exclusively for logging regardless of error level.