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

Method set_source_path

crates/vm/src/builtins/code.rs:424–429  ·  view source on GitHub ↗
(&self, new: &'static PyStrInterned)

Source from the content-addressed store, hash-verified

422 }
423
424 pub fn set_source_path(&self, new: &'static PyStrInterned) {
425 self.source_path.store(
426 new as *const PyStrInterned as *mut PyStrInterned,
427 Ordering::Relaxed,
428 );
429 }
430 pub fn from_pyc_path(path: &std::path::Path, vm: &VirtualMachine) -> PyResult<PyRef<Self>> {
431 let name = match path.file_stem() {
432 Some(stem) => stem.display().to_string(),

Callers 1

update_code_filenamesFunction · 0.80

Calls 1

storeMethod · 0.45

Tested by

no test coverage detected