upgrade enum discriminants

This commit is contained in:
2026-07-17 20:32:12 +02:00
parent 866e28adb8
commit cedc63b28b
19 changed files with 3168 additions and 96 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ hide write func(_ ?@mut anyopaque, handle io.Handle, bytes []u8) usize ! io.Writ
if count >= 0 {
return usize(count)
}
if c.__error()^ != c.EINTR {
if c.__error()?^ != c.EINTR {
return .write_failed
}
}
+3 -3
View File
@@ -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
}
}