Redesign os2.Error to work with the new extended union behaviour

This commit is contained in:
gingerBill
2021-05-16 00:25:47 +01:00
parent b1cfeb6c95
commit 85e5be03d1
7 changed files with 39 additions and 79 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ import win32 "core:sys/windows"
_pipe :: proc() -> (r, w: Handle, err: Error) {
p: [2]win32.HANDLE;
if !win32.CreatePipe(&p[0], &p[1], nil, 0) {
return 0, 0, error_from_platform_error(i32(win32.GetLastError()));
return 0, 0, Platform_Error{i32(win32.GetLastError())};
}
return Handle(p[0]), Handle(p[1]), nil;
}