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

Function env_bytes_as_bytes

crates/vm/src/stdlib/os.rs:479–484  ·  view source on GitHub ↗
(obj: &crate::function::Either<PyStrRef, PyBytesRef>)

Source from the content-addressed store, hash-verified

477
478 #[cfg(not(windows))]
479 fn env_bytes_as_bytes(obj: &crate::function::Either<PyStrRef, PyBytesRef>) -> &[u8] {
480 match obj {
481 crate::function::Either::A(s) => s.as_bytes(),
482 crate::function::Either::B(b) => b.as_bytes(),
483 }
484 }
485
486 #[cfg(windows)]
487 unsafe extern "C" {

Callers 2

putenvFunction · 0.85
unsetenvFunction · 0.85

Calls 1

as_bytesMethod · 0.45

Tested by

no test coverage detected