Comment and formatted on windows rust_file call
@@ -38,9 +38,13 @@ pub fn raw_file_number(handle: File) -> i32 {
#[cfg(target_family = "windows")]
pub fn rust_file(raw_fileno: i32) -> File {
- use std::os::windows::io::FromRawHandle;
use std::ffi::c_void;
+ use std::os::windows::io::FromRawHandle;
+ //TODO: This is untested and (very) unsafe handling or
+ //raw pointers - This should be patched as a matter of
+ //urgently patched by comparison to the cpython handling of
+ //the equivalent fileno fields for windows
unsafe { File::from_raw_handle(raw_fileno as *mut c_void) }
}
