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

Function process_hash_secret_seed

crates/vm/src/vm/mod.rs:628–633  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

626}
627
628pub fn process_hash_secret_seed() -> u32 {
629 use std::sync::OnceLock;
630 static SEED: OnceLock<u32> = OnceLock::new();
631 // os_random is expensive, but this is only ever called once
632 *SEED.get_or_init(|| u32::from_ne_bytes(rustpython_common::rand::os_random()))
633}
634
635impl VirtualMachine {
636 fn init_callable_cache(&mut self) -> PyResult<()> {

Callers 1

initialize_main_vmFunction · 0.85

Calls 3

newFunction · 0.85
os_randomFunction · 0.85
get_or_initMethod · 0.45

Tested by

no test coverage detected