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

@@ -15,7 +15,7 @@ pub fn encode_int_walpha(input int, alphabet Alphabet) ?string {
return error(@MOD + '.' + @FN + ': input must be greater than zero')
}
mut buffer := []byte{}
mut buffer := []u8{}
mut i := input
for i > 0 {
@@ -55,7 +55,7 @@ pub fn encode_walpha(input string, alphabet Alphabet) string {
// integer simplification of
// ceil(log(256)/log(58))
mut out := []byte{len: sz}
mut out := []u8{len: sz}
mut i := 0
mut high := 0
mut carry := u32(0)
@@ -131,7 +131,7 @@ pub fn decode_walpha(str string, alphabet Alphabet) ?string {
mut c := u64(0)
// the 32-bit algorithm stretches the result up to 2x
mut binu := []byte{len: 2 * ((b58sz * 406 / 555) + 1)}
mut binu := []u8{len: 2 * ((b58sz * 406 / 555) + 1)}
mut outi := []u32{len: (b58sz + 3) / 4}
for _, r in str {