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

Function check_pyc_magic_number_bytes

crates/vm/src/import.rs:11–13  ·  view source on GitHub ↗
(buf: &[u8])

Source from the content-addressed store, hash-verified

9};
10
11pub(crate) fn check_pyc_magic_number_bytes(buf: &[u8]) -> bool {
12 buf.starts_with(&crate::version::PYC_MAGIC_NUMBER_BYTES[..2])
13}
14
15pub(crate) fn init_importlib_base(vm: &mut VirtualMachine) -> PyResult<PyObjectRef> {
16 flame_guard!("init importlib");

Callers 2

from_pycMethod · 0.85

Calls 1

starts_withMethod · 0.80

Tested by

no test coverage detected