mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-29 02:40:05 +00:00
Convert all uses of *_from_slice to *_from_bytes where appropriate
This commit is contained in:
@@ -402,7 +402,7 @@ syscall_openat :: #force_inline proc(fd: int, path: cstring, oflag: u32, mode: u
|
||||
return cast(c.int)intrinsics.syscall(unix_offset_syscall(.openat), uintptr(fd), transmute(uintptr)path, uintptr(oflag), uintptr(mode))
|
||||
}
|
||||
|
||||
syscall_getentropy :: #force_inline proc(buf: ^u8, buflen: u64) -> c.int {
|
||||
syscall_getentropy :: #force_inline proc(buf: [^]u8, buflen: u64) -> c.int {
|
||||
return cast(c.int)intrinsics.syscall(unix_offset_syscall(.getentropy), uintptr(buf), uintptr(buflen))
|
||||
}
|
||||
|
||||
|
||||
@@ -1522,6 +1522,6 @@ sys_gettid :: proc "contextless" () -> int {
|
||||
return cast(int)intrinsics.syscall(SYS_gettid)
|
||||
}
|
||||
|
||||
sys_getrandom :: proc "contextless" (buf: ^byte, buflen: int, flags: uint) -> int {
|
||||
sys_getrandom :: proc "contextless" (buf: [^]byte, buflen: int, flags: uint) -> int {
|
||||
return cast(int)intrinsics.syscall(SYS_getrandom, buf, cast(uintptr)(buflen), cast(uintptr)(flags))
|
||||
}
|
||||
|
||||
@@ -7,5 +7,5 @@ BCRYPT_USE_SYSTEM_PREFERRED_RNG: DWORD : 0x00000002
|
||||
|
||||
@(default_calling_convention="stdcall")
|
||||
foreign bcrypt {
|
||||
BCryptGenRandom :: proc(hAlgorithm: LPVOID, pBuffer: ^u8, cbBuffer: ULONG, dwFlags: ULONG) -> LONG ---
|
||||
BCryptGenRandom :: proc(hAlgorithm: LPVOID, pBuffer: [^]u8, cbBuffer: ULONG, dwFlags: ULONG) -> LONG ---
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user