Skip to content

Commit e77a110

Browse files
committed
os: make init_os_args_wide (windows), more simillar to the current init_os_args (unix)
1 parent c7bd74e commit e77a110

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

vlib/os/os_windows.c.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ struct C._utimbuf {
9595
fn C._utime(&char, voidptr) int
9696

9797
fn init_os_args_wide(argc int, argv &&byte) []string {
98-
mut args_ := []string{}
98+
mut args_ := []string{len: argc}
9999
for i in 0 .. argc {
100-
args_ << unsafe { string_from_wide(&u16(argv[i])) }
100+
args_[i] = unsafe { string_from_wide(&u16(argv[i])) }
101101
}
102102
return args_
103103
}

vlib/v/tests/valgrind/valgrind_test.v

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ const skip_valgrind_files = [
2929
'vlib/v/tests/valgrind/fn_with_return_should_free_local_vars.v',
3030
'vlib/v/tests/valgrind/option_simple.v',
3131
'vlib/v/tests/valgrind/string_plus_string_plus.v',
32-
'vlib/v/tests/valgrind/import_os_and_use_its_constants.v',
3332
]
3433

3534
fn vprintln(s string) {

0 commit comments

Comments
 (0)