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

Function puts_bytes

crates/stdlib/src/faulthandler.rs:135–146  ·  view source on GitHub ↗
(fd: i32, s: &[u8])

Source from the content-addressed store, hash-verified

133
134 #[cfg(any(unix, windows))]
135 fn puts_bytes(fd: i32, s: &[u8]) {
136 let _ = unsafe {
137 #[cfg(windows)]
138 {
139 libc::write(fd, s.as_ptr() as *const libc::c_void, s.len() as u32)
140 }
141 #[cfg(not(windows))]
142 {
143 libc::write(fd, s.as_ptr() as *const libc::c_void, s.len())
144 }
145 };
146 }
147
148 // _Py_DumpHexadecimal (traceback.c)
149 #[cfg(any(unix, windows))]

Callers 1

watchdog_threadFunction · 0.85

Calls 3

writeFunction · 0.50
as_ptrMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected