1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

all: byte => u8

This commit is contained in:
Alexander Medvednikov
2022-04-15 14:58:56 +03:00
parent b49d873217
commit d4a0d6f73c
221 changed files with 1365 additions and 1365 deletions

View File

@@ -34,7 +34,7 @@ pub fn sum32(data []byte) u32 {
// sum32_bytes returns a fnv1a hash of the struct `s`.
[direct_array_access; inline]
pub fn sum32_struct<T>(s &T) u32 {
bp := unsafe { &byte(s) }
bp := unsafe { &u8(s) }
sz := int(sizeof(T))
mut hash := fnv1a.fnv32_offset_basis
for i in 0 .. sz {
@@ -89,7 +89,7 @@ pub fn sum64_bytes(data &byte, data_len int) u64 {
// sum64_bytes returns a fnv1a hash of the struct `s`.
[direct_array_access; inline]
pub fn sum64_struct<T>(s &T) u64 {
bp := unsafe { &byte(s) }
bp := unsafe { &u8(s) }
sz := int(sizeof(T))
mut hash := fnv1a.fnv64_offset_basis
for i in 0 .. sz {