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

Method freelist_pop

crates/vm/src/builtins/complex.rs:61–71  ·  view source on GitHub ↗
(_payload: &Self)

Source from the content-addressed store, hash-verified

59
60 #[inline]
61 unsafe fn freelist_pop(_payload: &Self) -> Option<NonNull<PyObject>> {
62 COMPLEX_FREELIST
63 .try_with(|fl| {
64 let mut list = fl.take();
65 let result = list.pop().map(|p| unsafe { NonNull::new_unchecked(p) });
66 fl.set(list);
67 result
68 })
69 .ok()
70 .flatten()
71 }
72}
73
74impl ToPyObject for Complex64 {

Callers

nothing calls this directly

Calls 6

okMethod · 0.80
flattenMethod · 0.45
takeMethod · 0.45
mapMethod · 0.45
popMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected