mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Merge pull request #5100 from herohiralal/patch-1
Convention-related changes in `file_windows.odin`
This commit is contained in:
@@ -508,11 +508,12 @@ _file_size :: proc(f: ^File_Impl) -> (n: i64, err: Error) {
|
|||||||
length: win32.LARGE_INTEGER
|
length: win32.LARGE_INTEGER
|
||||||
handle := _handle(&f.file)
|
handle := _handle(&f.file)
|
||||||
if f.kind == .Pipe {
|
if f.kind == .Pipe {
|
||||||
bytesAvail: u32
|
bytes_available: u32
|
||||||
if win32.PeekNamedPipe(handle, nil, 0, nil, &bytesAvail, nil) {
|
if win32.PeekNamedPipe(handle, nil, 0, nil, &bytes_available, nil) {
|
||||||
return i64(bytesAvail), nil
|
return i64(bytes_available), nil
|
||||||
} else {
|
} else {
|
||||||
return 0, .No_Size
|
err = _get_platform_error()
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if !win32.GetFileSizeEx(handle, &length) {
|
if !win32.GetFileSizeEx(handle, &length) {
|
||||||
|
|||||||
Reference in New Issue
Block a user