Go to a File based approach over Handle based

This commit is contained in:
gingerBill committed 2022-05-05 16:15:03 +01:00
1 parent e61aad925b
commit 18bde22b26
12 files changed
+185 -167

No files matched your search

+3 -3
View File
@@ -3,11 +3,11 @@ package os2
import win32 "core:sys/windows"
_pipe :: proc() -> (r, w: Handle, err: Error) {
_pipe :: proc() -> (r, w: ^File, err: Error) {
p: [2]win32.HANDLE
if !win32.CreatePipe(&p[0], &p[1], nil, 0) {
return 0, 0, Platform_Error{i32(win32.GetLastError())}
return nil, nil, Platform_Error{i32(win32.GetLastError())}
}
return Handle(p[0]), Handle(p[1]), nil
return new_file(uintptr(p[0]), ""), new_file(uintptr(p[1]), ""), nil
}