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

Function _fix_co_filename

crates/vm/src/stdlib/_imp.rs:292–296  ·  view source on GitHub ↗
(code: PyRef<PyCode>, path: PyStrRef, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

290
291 #[pyfunction]
292 fn _fix_co_filename(code: PyRef<PyCode>, path: PyStrRef, vm: &VirtualMachine) {
293 let old_name = code.source_path();
294 let new_name = vm.ctx.intern_str(path.as_wtf8());
295 super::update_code_filenames(&code, old_name, new_name);
296 }
297
298 #[pyfunction]
299 fn _frozen_module_names(vm: &VirtualMachine) -> PyResult<Vec<PyObjectRef>> {

Callers

nothing calls this directly

Calls 4

update_code_filenamesFunction · 0.85
intern_strMethod · 0.80
source_pathMethod · 0.45
as_wtf8Method · 0.45

Tested by

no test coverage detected