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

Function internal_close

crates/vm/src/stdlib/_io.rs:6375–6382  ·  view source on GitHub ↗
(zelf: &WindowsConsoleIO)

Source from the content-addressed store, hash-verified

6373 }
6374
6375 fn internal_close(zelf: &WindowsConsoleIO) {
6376 let fd = zelf.fd.swap(-1);
6377 if fd >= 0 && zelf.closefd.load() {
6378 unsafe {
6379 libc::close(fd);
6380 }
6381 }
6382 }
6383
6384 impl Representable for WindowsConsoleIO {
6385 #[inline]

Callers 1

initMethod · 0.85

Calls 3

closeFunction · 0.70
swapMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected