Skip to content

Commit ba7b329

Browse files
committed
builtin: more byte=>u8
1 parent e6ff150 commit ba7b329

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

vlib/builtin/builtin.c.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ pub fn vcalloc(n int) &byte {
445445
$if prealloc {
446446
return unsafe { prealloc_calloc(n) }
447447
} $else $if gcboehm ? {
448-
return unsafe { &byte(C.GC_MALLOC(n)) }
448+
return unsafe { &u8(C.GC_MALLOC(n)) }
449449
} $else {
450450
return unsafe { C.calloc(1, n) }
451451
}
@@ -470,9 +470,9 @@ pub fn vcalloc_noscan(n int) &byte {
470470
panic('calloc_noscan($n < 0)')
471471
}
472472
return $if gcboehm_opt ? {
473-
unsafe { &byte(C.memset(C.GC_MALLOC_ATOMIC(n), 0, n)) }
473+
unsafe { &u8(C.memset(C.GC_MALLOC_ATOMIC(n), 0, n)) }
474474
} $else {
475-
unsafe { &byte(C.GC_MALLOC(n)) }
475+
unsafe { &u8(C.GC_MALLOC(n)) }
476476
}
477477
} $else {
478478
return unsafe { vcalloc(n) }

vlib/builtin/builtin_nix.c.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ fn print_backtrace_skipping_top_frames_linux(skipframes int) bool {
8787
//////csymbols := backtrace_symbols(*voidptr(&buffer[skipframes]), nr_actual_frames)
8888
csymbols := C.backtrace_symbols(voidptr(&buffer[skipframes]), nr_actual_frames)
8989
for i in 0 .. nr_actual_frames {
90-
sframes << unsafe { tos2(&byte(csymbols[i])) }
90+
sframes << unsafe { tos2(&u8(csymbols[i])) }
9191
}
9292
for sframe in sframes {
9393
executable := sframe.all_before('(')

vlib/builtin/builtin_windows.c.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ fn print_backtrace_skipping_top_frames_msvc(skipframes int) bool {
126126
si.f_max_name_len = sizeof(SymbolInfoContainer) - sizeof(SymbolInfo) - 1
127127
fname := &char(&si.f_name)
128128
mut sline64 := Line64{
129-
f_file_name: &byte(0)
129+
f_file_name: &u8(0)
130130
}
131131
sline64.f_size_of_struct = sizeof(Line64)
132132

0 commit comments

Comments
 (0)