1
0
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:
Alexander Medvednikov
2022-04-15 15:35:35 +03:00
parent 0527ac633e
commit fb192d949b
164 changed files with 533 additions and 533 deletions

View File

@ -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)