We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2c6bb7a commit ef42990Copy full SHA for ef42990
1 file changed
crates/stdlib/src/gc.rs
@@ -2,7 +2,7 @@ pub(crate) use gc::module_def;
2
3
#[pymodule]
4
mod gc {
5
- use crate::vm::{PyResult, VirtualMachine, function::FuncArgs};
+ use crate::vm::{PyObjectRef, PyResult, VirtualMachine, function::FuncArgs};
6
7
#[pyfunction]
8
fn collect(_args: FuncArgs, _vm: &VirtualMachine) -> i32 {
@@ -45,8 +45,10 @@ mod gc {
45
}
46
47
48
- fn get_referrers(_args: FuncArgs, vm: &VirtualMachine) -> PyResult {
49
- Err(vm.new_not_implemented_error(""))
+ fn get_referrers(_args: FuncArgs, vm: &VirtualMachine) -> PyObjectRef {
+ // RustPython does not support bi-directional reference tracking.
50
+ // Return empty list for compatibility with reference cycle tests.
51
+ vm.ctx.new_list(vec![]).into()
52
53
54
0 commit comments