(vm: &VirtualMachine)
| 82 | /// Return the current collection thresholds as a tuple. |
| 83 | #[pyfunction] |
| 84 | fn get_threshold(vm: &VirtualMachine) -> PyObjectRef { |
| 85 | let (t0, t1, t2) = gc_state::gc_state().get_threshold(); |
| 86 | vm.ctx |
| 87 | .new_tuple(vec![ |
| 88 | vm.ctx.new_int(t0).into(), |
| 89 | vm.ctx.new_int(t1).into(), |
| 90 | vm.ctx.new_int(t2).into(), |
| 91 | ]) |
| 92 | .into() |
| 93 | } |
| 94 | |
| 95 | /// Set the collection thresholds. |
| 96 | #[pyfunction] |
nothing calls this directly
no test coverage detected