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

Method freelist_push

crates/vm/src/builtins/int.rs:72–86  ·  view source on GitHub ↗
(obj: *mut PyObject)

Source from the content-addressed store, hash-verified

70
71 #[inline]
72 unsafe fn freelist_push(obj: *mut PyObject) -> bool {
73 INT_FREELIST
74 .try_with(|fl| {
75 let mut list = fl.take();
76 let stored = if list.len() < Self::MAX_FREELIST {
77 list.push(obj);
78 true
79 } else {
80 false
81 };
82 fl.set(list);
83 stored
84 })
85 .unwrap_or(false)
86 }
87
88 #[inline]
89 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