mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: replace []byte with []u8
This commit is contained in:
@ -122,7 +122,7 @@ fn init() {
|
||||
C.atexit(deinit)
|
||||
}
|
||||
|
||||
fn read_32(mut rng PRNG, mut buf []byte) {
|
||||
fn read_32(mut rng PRNG, mut buf []u8) {
|
||||
p32 := unsafe { &u32(buf.data) }
|
||||
u32s := buf.len / 4
|
||||
for i in 0 .. u32s {
|
||||
@ -135,7 +135,7 @@ fn read_32(mut rng PRNG, mut buf []byte) {
|
||||
}
|
||||
}
|
||||
|
||||
fn read_64(mut rng PRNG, mut buf []byte) {
|
||||
fn read_64(mut rng PRNG, mut buf []u8) {
|
||||
p64 := unsafe { &u64(buf.data) }
|
||||
u64s := buf.len / 8
|
||||
for i in 0 .. u64s {
|
||||
@ -148,7 +148,7 @@ fn read_64(mut rng PRNG, mut buf []byte) {
|
||||
}
|
||||
}
|
||||
|
||||
fn read_internal(mut rng PRNG, mut buf []byte) {
|
||||
fn read_internal(mut rng PRNG, mut buf []u8) {
|
||||
match rng.block_size() {
|
||||
32 {
|
||||
read_32(mut rng, mut buf)
|
||||
|
Reference in New Issue
Block a user