os: make init_os_args_wide (windows), more simillar to the current init_os_args (unix)

pull/12539/head
Delyan Angelov 2021-11-21 23:04:30 +02:00
parent c7bd74e0f8
commit e77a11001e
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
2 changed files with 2 additions and 3 deletions

View File

@ -95,9 +95,9 @@ struct C._utimbuf {
fn C._utime(&char, voidptr) int fn C._utime(&char, voidptr) int
fn init_os_args_wide(argc int, argv &&byte) []string { fn init_os_args_wide(argc int, argv &&byte) []string {
mut args_ := []string{} mut args_ := []string{len: argc}
for i in 0 .. argc { for i in 0 .. argc {
args_ << unsafe { string_from_wide(&u16(argv[i])) } args_[i] = unsafe { string_from_wide(&u16(argv[i])) }
} }
return args_ return args_
} }

View File

@ -29,7 +29,6 @@ const skip_valgrind_files = [
'vlib/v/tests/valgrind/fn_with_return_should_free_local_vars.v', 'vlib/v/tests/valgrind/fn_with_return_should_free_local_vars.v',
'vlib/v/tests/valgrind/option_simple.v', 'vlib/v/tests/valgrind/option_simple.v',
'vlib/v/tests/valgrind/string_plus_string_plus.v', 'vlib/v/tests/valgrind/string_plus_string_plus.v',
'vlib/v/tests/valgrind/import_os_and_use_its_constants.v',
] ]
fn vprintln(s string) { fn vprintln(s string) {