MCPcopy Index your code
hub / github.com/RustPython/RustPython / open_osfhandle

Function open_osfhandle

crates/vm/src/stdlib/msvcrt.rs:162–169  ·  view source on GitHub ↗
(handle: isize, flags: i32, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

160
161 #[pyfunction]
162 fn open_osfhandle(handle: isize, flags: i32, vm: &VirtualMachine) -> PyResult<i32> {
163 let ret = unsafe { suppress_iph!(libc::open_osfhandle(handle, flags)) };
164 if ret == -1 {
165 Err(vm.new_last_errno_error())
166 } else {
167 Ok(ret)
168 }
169 }
170
171 #[pyfunction]
172 fn get_osfhandle(fd: crt_fd::Borrowed<'_>, vm: &VirtualMachine) -> PyResult<isize> {

Callers 3

fopenFunction · 0.85
pipeFunction · 0.85
initMethod · 0.85

Calls 2

new_last_errno_errorMethod · 0.80
ErrClass · 0.50

Tested by

no test coverage detected