diff --git a/vlib/os/os.v b/vlib/os/os.v index 4a293ea8ac..076a590740 100644 --- a/vlib/os/os.v +++ b/vlib/os/os.v @@ -407,7 +407,7 @@ fn posix_wait4_to_exit_status(waitret int) (int,bool) { fn vpclose(f voidptr) int { $if windows { - return int( C._pclose(f) ) + return C._pclose(f) } $else { ret , _ := posix_wait4_to_exit_status(C.pclose(f)) @@ -779,7 +779,7 @@ pub fn executable() string { $if windows { max := 512 mut result := &u16(calloc(max*2)) // MAX_PATH * sizeof(wchar_t) - len := int(C.GetModuleFileName( 0, result, max )) + len := C.GetModuleFileName( 0, result, max ) return string_from_wide2(result, len) } $if macos { diff --git a/vlib/os/os_windows.v b/vlib/os/os_windows.v index 69ef881d92..9da24bf0bf 100644 --- a/vlib/os/os_windows.v +++ b/vlib/os/os_windows.v @@ -78,7 +78,7 @@ fn init_os_args(argc int, argv &byteptr) []string { mut args := []string mut args_list := &voidptr(0) mut args_count := 0 - args_list = &voidptr(C.CommandLineToArgvW(C.GetCommandLine(), &args_count)) + args_list = C.CommandLineToArgvW(C.GetCommandLine(), &args_count) for i := 0; i < args_count; i++ { args << string_from_wide(&u16(args_list[i])) } @@ -160,7 +160,7 @@ pub fn get_file_handle(path string) HANDLE { // get_module_filename retrieves the fully qualified path for the file that contains the specified module. // The module must have been loaded by the current process. pub fn get_module_filename(handle HANDLE) ?string { - mut sz := int(4096) // Optimized length + mut sz := 4096 // Optimized length mut buf := &u16(malloc(4096)) for { status := int(C.GetModuleFileNameW(handle, voidptr(&buf), sz))