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

all: remove byteptr and charptr; replace them with &byte and &char

This commit is contained in:
Alexander Medvednikov
2021-04-04 17:43:32 +03:00
parent 8dd4a63913
commit 57e6138a61
32 changed files with 250 additions and 226 deletions

View File

@@ -108,7 +108,7 @@ fn print_backtrace_skipping_top_frames_linux(skipframes int) bool {
beforeaddr := sframe.all_before('[')
cmd := 'addr2line -e $executable $addr'
// taken from os, to avoid depending on the os module inside builtin.v
f := C.popen(charptr(cmd.str), 'r')
f := C.popen(&char(cmd.str), c'r')
if isnil(f) {
eprintln(sframe)
continue
@@ -117,7 +117,7 @@ fn print_backtrace_skipping_top_frames_linux(skipframes int) bool {
mut output := ''
unsafe {
bp := &buf[0]
for C.fgets(charptr(bp), 1000, f) != 0 {
for C.fgets(&char(bp), 1000, f) != 0 {
output += tos(bp, vstrlen(bp))
}
}