Expect stream as a field directly on os2.File

This commit is contained in:
gingerBill
2024-03-13 16:30:22 +00:00
parent 5f2496226f
commit 271f84ab5b
4 changed files with 13 additions and 16 deletions
+1 -3
View File
@@ -33,8 +33,6 @@ _File :: struct {
name: string,
fd: int,
allocator: runtime.Allocator,
stream: io.Stream,
}
_file_allocator :: proc() -> runtime.Allocator {
@@ -75,7 +73,7 @@ _new_file :: proc(fd: uintptr, _: string) -> ^File {
file.impl.fd = int(fd)
file.impl.allocator = _file_allocator()
file.impl.name = _get_full_path(file.impl.fd, file.impl.allocator)
file.impl.stream = {
file.stream = {
data = file,
procedure = _file_stream_proc,
}