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

Function get_osfhandle

crates/vm/src/stdlib/msvcrt.rs:172–176  ·  view source on GitHub ↗
(fd: crt_fd::Borrowed<'_>, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

170
171 #[pyfunction]
172 fn get_osfhandle(fd: crt_fd::Borrowed<'_>, vm: &VirtualMachine) -> PyResult<isize> {
173 crt_fd::as_handle(fd)
174 .map(|h| h.as_raw_handle() as _)
175 .map_err(|e| e.into_pyexception(vm))
176 }
177
178 #[allow(non_snake_case)]
179 #[pyfunction]

Callers 2

write_inputFunction · 0.85
set_inheritableFunction · 0.85

Calls 3

as_handleFunction · 0.85
mapMethod · 0.45
into_pyexceptionMethod · 0.45

Tested by 1

write_inputFunction · 0.68