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

Function get_count

crates/vm/src/stdlib/gc.rs:107–116  ·  view source on GitHub ↗
(vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

105 /// Return the current collection counts as a tuple.
106 #[pyfunction]
107 fn get_count(vm: &VirtualMachine) -> PyObjectRef {
108 let (c0, c1, c2) = gc_state::gc_state().get_count();
109 vm.ctx
110 .new_tuple(vec![
111 vm.ctx.new_int(c0).into(),
112 vm.ctx.new_int(c1).into(),
113 vm.ctx.new_int(c2).into(),
114 ])
115 .into()
116 }
117
118 /// Return the current debugging flags.
119 #[pyfunction]

Callers

nothing calls this directly

Calls 3

gc_stateFunction · 0.85
get_countMethod · 0.80
new_tupleMethod · 0.45

Tested by

no test coverage detected