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:
parent
e6ff1508d2
commit
ba7b329c73
@ -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) }
|
||||
|
@ -87,7 +87,7 @@ fn print_backtrace_skipping_top_frames_linux(skipframes int) bool {
|
||||
//////csymbols := backtrace_symbols(*voidptr(&buffer[skipframes]), nr_actual_frames)
|
||||
csymbols := C.backtrace_symbols(voidptr(&buffer[skipframes]), nr_actual_frames)
|
||||
for i in 0 .. nr_actual_frames {
|
||||
sframes << unsafe { tos2(&byte(csymbols[i])) }
|
||||
sframes << unsafe { tos2(&u8(csymbols[i])) }
|
||||
}
|
||||
for sframe in sframes {
|
||||
executable := sframe.all_before('(')
|
||||
|
@ -126,7 +126,7 @@ fn print_backtrace_skipping_top_frames_msvc(skipframes int) bool {
|
||||
si.f_max_name_len = sizeof(SymbolInfoContainer) - sizeof(SymbolInfo) - 1
|
||||
fname := &char(&si.f_name)
|
||||
mut sline64 := Line64{
|
||||
f_file_name: &byte(0)
|
||||
f_file_name: &u8(0)
|
||||
}
|
||||
sline64.f_size_of_struct = sizeof(Line64)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user