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

replace ugly tos2(bytes) with string(bytes)

This commit is contained in:
Alexander Medvednikov
2019-06-27 12:27:46 +02:00
parent fda7caef93
commit 90c0791345
11 changed files with 30 additions and 39 deletions

View File

@ -27,8 +27,8 @@ import const (
)
fn C.getline(voidptr, voidptr, voidptr) int
fn C.ftell(fp voidptr) int
fn C.getenv(byteptr) byteptr
fn todo_remove(){}
@ -45,7 +45,7 @@ fn init_os_args(argc int, _argv *byteptr) []string {
}
fn parse_windows_cmd_line(cmd byteptr) []string {
s := tos2(cmd)
s := string(cmd)
return s.split(' ')
}
@ -313,7 +313,7 @@ pub fn getenv(key string) string {
if isnil(s) {
return ''
}
return tos2(s)
return string(s)
}
// `file_exists` returns true if `path` exists.
@ -473,4 +473,4 @@ fn on_segfault(f voidptr) {
# sa.sa_flags = SA_SIGINFO;
# sigaction(SIGSEGV, &sa, 0);
}
}
}