upgrade enum discriminants
This commit is contained in:
+3
-3
@@ -57,7 +57,7 @@ hide system_read func(_ ?@mut anyopaque, handle Handle, buffer []mut u8) usize !
|
||||
if count >= 0 {
|
||||
return usize(count)
|
||||
}
|
||||
errno c_int :: c.__error()^
|
||||
errno c_int :: c.__error()?^
|
||||
if errno == c.EINTR {
|
||||
continue
|
||||
}
|
||||
@@ -79,7 +79,7 @@ hide system_write func(_ ?@mut anyopaque, handle Handle, bytes []u8) usize ! Wri
|
||||
if count >= 0 {
|
||||
return usize(count)
|
||||
}
|
||||
errno c_int :: c.__error()^
|
||||
errno c_int :: c.__error()?^
|
||||
if errno == c.EINTR {
|
||||
continue
|
||||
}
|
||||
@@ -102,7 +102,7 @@ hide system_open func(_ ?@mut anyopaque, path [;0]u8, mode FileMode) Handle ! Op
|
||||
if fd >= 0 {
|
||||
return Handle {file_desc = fd}
|
||||
}
|
||||
if c.__error()^ != c.EINTR {
|
||||
if c.__error()?^ != c.EINTR {
|
||||
return .open_failed
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user