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

Method freelist_push

crates/vm/src/builtins/float.rs:51–65  ·  view source on GitHub ↗
(obj: *mut PyObject)

Source from the content-addressed store, hash-verified

49
50 #[inline]
51 unsafe fn freelist_push(obj: *mut PyObject) -> bool {
52 FLOAT_FREELIST
53 .try_with(|fl| {
54 let mut list = fl.take();
55 let stored = if list.len() < Self::MAX_FREELIST {
56 list.push(obj);
57 true
58 } else {
59 false
60 };
61 fl.set(list);
62 stored
63 })
64 .unwrap_or(false)
65 }
66
67 #[inline]
68 unsafe fn freelist_pop(_payload: &Self) -> Option<NonNull<PyObject>> {

Callers

nothing calls this directly

Calls 4

takeMethod · 0.45
lenMethod · 0.45
pushMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected