Begin converting os.Errno to be a nil-able type as a transition period

This commit is contained in:
gingerBill
2024-08-04 10:51:08 +01:00
parent 71932628cc
commit e60951a902
22 changed files with 1165 additions and 666 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ HAS_RAND_BYTES :: true
_rand_bytes :: proc(dst: []byte) {
ret := (os.Errno)(win32.BCryptGenRandom(nil, raw_data(dst), u32(len(dst)), win32.BCRYPT_USE_SYSTEM_PREFERRED_RNG))
if ret != os.ERROR_NONE {
switch ret {
#partial switch ret {
case os.ERROR_INVALID_HANDLE:
// The handle to the first parameter is invalid.
// This should not happen here, since we explicitly pass nil to it