Skip to content

Commit 306f587

Browse files
committed
Fix gc.get_threshold to return actual gen2 threshold value
1 parent 786551e commit 306f587

File tree

1 file changed

+2
-3
lines changed
  • crates/vm/src/stdlib

1 file changed

+2
-3
lines changed

crates/vm/src/stdlib/gc.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,14 @@ mod gc {
8080
}
8181

8282
/// Return the current collection thresholds as a tuple.
83-
/// The third value is always 0.
8483
#[pyfunction]
8584
fn get_threshold(vm: &VirtualMachine) -> PyObjectRef {
86-
let (t0, t1, _t2) = gc_state::gc_state().get_threshold();
85+
let (t0, t1, t2) = gc_state::gc_state().get_threshold();
8786
vm.ctx
8887
.new_tuple(vec![
8988
vm.ctx.new_int(t0).into(),
9089
vm.ctx.new_int(t1).into(),
91-
vm.ctx.new_int(0).into(),
90+
vm.ctx.new_int(t2).into(),
9291
])
9392
.into()
9493
}

0 commit comments

Comments
 (0)