(&self, pyref: PyRef<T>)
| 328 | /// until no more reference can be used via PyAtomicRef::deref() |
| 329 | #[must_use] |
| 330 | pub unsafe fn swap(&self, pyref: PyRef<T>) -> PyRef<T> { |
| 331 | let py = PyRef::leak(pyref) as *const Py<T> as *mut _; |
| 332 | let old = Radium::swap(&self.inner, py, Ordering::AcqRel); |
| 333 | unsafe { PyRef::from_raw(old.cast()) } |
| 334 | } |
| 335 | |
| 336 | pub fn swap_to_temporary_refs(&self, pyref: PyRef<T>, vm: &VirtualMachine) { |
| 337 | let old = unsafe { self.swap(pyref) }; |
no test coverage detected