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

builtin: more byte=>u8

This commit is contained in:
Alexander Medvednikov
2022-04-15 13:55:56 +03:00
parent e6ff1508d2
commit ba7b329c73
3 changed files with 5 additions and 5 deletions

View File

@ -445,7 +445,7 @@ pub fn vcalloc(n int) &byte {
$if prealloc {
return unsafe { prealloc_calloc(n) }
} $else $if gcboehm ? {
return unsafe { &byte(C.GC_MALLOC(n)) }
return unsafe { &u8(C.GC_MALLOC(n)) }
} $else {
return unsafe { C.calloc(1, n) }
}
@ -470,9 +470,9 @@ pub fn vcalloc_noscan(n int) &byte {
panic('calloc_noscan($n < 0)')
}
return $if gcboehm_opt ? {
unsafe { &byte(C.memset(C.GC_MALLOC_ATOMIC(n), 0, n)) }
unsafe { &u8(C.memset(C.GC_MALLOC_ATOMIC(n), 0, n)) }
} $else {
unsafe { &byte(C.GC_MALLOC(n)) }
unsafe { &u8(C.GC_MALLOC(n)) }
}
} $else {
return unsafe { vcalloc(n) }