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

Method freelist_pop

crates/vm/src/builtins/float.rs:68–78  ·  view source on GitHub ↗
(_payload: &Self)

Source from the content-addressed store, hash-verified

66
67 #[inline]
68 unsafe fn freelist_pop(_payload: &Self) -> Option<NonNull<PyObject>> {
69 FLOAT_FREELIST
70 .try_with(|fl| {
71 let mut list = fl.take();
72 let result = list.pop().map(|p| unsafe { NonNull::new_unchecked(p) });
73 fl.set(list);
74 result
75 })
76 .ok()
77 .flatten()
78 }
79}
80
81impl ToPyObject for f64 {

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