We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0daa038 commit eca75b3Copy full SHA for eca75b3
vm/src/stdlib/os.rs
@@ -38,10 +38,14 @@ pub fn raw_file_number(handle: File) -> i32 {
38
39
#[cfg(target_family = "windows")]
40
pub fn rust_file(raw_fileno: i32) -> File {
41
+ use std::ffi::c_void;
42
use std::os::windows::io::FromRawHandle;
- use std::ffi::c_void;
43
44
- unsafe { File::from_raw_handle(raw_fileno as *mut c_void)}
+ //TODO: This is untested and (very) unsafe handling or
45
+ //raw pointers - This should be patched as a matter of
46
+ //urgently patched by comparison to the cpython handling of
47
+ //the equivalent fileno fields for windows
48
+ unsafe { File::from_raw_handle(raw_fileno as *mut c_void) }
49
}
50
51
pub fn os_close(vm: &mut VirtualMachine, args: PyFuncArgs) -> PyResult {
0 commit comments