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

Method swap_to_temporary_refs

crates/vm/src/object/ext.rs:336–341  ·  view source on GitHub ↗
(&self, pyref: PyRef<T>, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

334 }
335
336 pub fn swap_to_temporary_refs(&self, pyref: PyRef<T>, vm: &VirtualMachine) {
337 let old = unsafe { self.swap(pyref) };
338 if let Some(frame) = vm.current_frame() {
339 frame.temporary_refs.lock().push(old.into());
340 }
341 }
342}
343
344impl<T: PyPayload> From<Option<PyRef<T>>> for PyAtomicRef<Option<T>> {

Callers 9

set_errnoMethod · 0.80
set_strerrorMethod · 0.80
set_filenameMethod · 0.80
set_filename2Method · 0.80
set_winerrorMethod · 0.80
set___code__Method · 0.80
swap_initMethod · 0.80
swap_getitemMethod · 0.80
set_classMethod · 0.80

Calls 4

current_frameMethod · 0.80
swapMethod · 0.45
pushMethod · 0.45
lockMethod · 0.45

Tested by

no test coverage detected