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

@ -10,16 +10,16 @@ fn mm_alloc(size u64) (&byte, Errno) {
map_flags := MapFlags(int(MapFlags.map_private) | int(MapFlags.map_anonymous))
// END CONSTS
a, e := sys_mmap(&byte(0), size + sizeof(u64), mem_prot, map_flags, -1, 0)
a, e := sys_mmap(&u8(0), size + sizeof(u64), mem_prot, map_flags, -1, 0)
if e == .enoerror {
unsafe {
mut ap := &u64(a)
*ap = size
x2 := &byte(a + sizeof(u64))
x2 := &u8(a + sizeof(u64))
return x2, e
}
}
return &byte(0), e
return &u8(0), e
}
fn mm_free(addr &byte) Errno {
@ -38,7 +38,7 @@ fn system_alloc(_ voidptr, size usize) (voidptr, usize, u32) {
map_flags := MapFlags(int(MapFlags.map_private) | int(MapFlags.map_anonymous))
// END CONSTS
a, e := sys_mmap(&byte(0), u64(size), mem_prot, map_flags, -1, 0)
a, e := sys_mmap(&u8(0), u64(size), mem_prot, map_flags, -1, 0)
if e == .enoerror {
return a, size, 0