Clean up os2.File.impl usage

This commit is contained in:
gingerBill
2024-07-14 15:26:59 +01:00
parent 2d56e3805b
commit 5de6016e7f
4 changed files with 111 additions and 119 deletions
+3 -3
View File
@@ -7,7 +7,7 @@ import "core:strings"
import win32 "core:sys/windows"
_fstat :: proc(f: ^File, allocator: runtime.Allocator) -> (File_Info, Error) {
if f == nil || (^_File)(f.impl).fd == nil {
if f == nil || (^File_Impl)(f.impl).fd == nil {
return {}, nil
}
@@ -122,7 +122,7 @@ _cleanpath_strip_prefix :: proc(buf: []u16) -> []u16 {
_cleanpath_from_handle :: proc(f: ^File, allocator: runtime.Allocator) -> (string, Error) {
if f == nil || (^_File)(f.impl).fd == nil {
if f == nil {
return "", nil
}
h := _handle(f)
@@ -138,7 +138,7 @@ _cleanpath_from_handle :: proc(f: ^File, allocator: runtime.Allocator) -> (strin
}
_cleanpath_from_handle_u16 :: proc(f: ^File) -> ([]u16, Error) {
if f == nil || (^_File)(f.impl).fd == nil {
if f == nil {
return nil, nil
}
h := _handle(f)