File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ pub(crate) use gc::module_def;
22
33#[ pymodule]
44mod gc {
5- use crate :: vm:: { PyResult , VirtualMachine , function:: FuncArgs } ;
5+ use crate :: vm:: { PyObjectRef , PyResult , VirtualMachine , function:: FuncArgs } ;
66
77 #[ pyfunction]
88 fn collect ( _args : FuncArgs , _vm : & VirtualMachine ) -> i32 {
@@ -45,8 +45,10 @@ mod gc {
4545 }
4646
4747 #[ pyfunction]
48- fn get_referrers ( _args : FuncArgs , vm : & VirtualMachine ) -> PyResult {
49- Err ( vm. new_not_implemented_error ( "" ) )
48+ fn get_referrers ( _args : FuncArgs , vm : & VirtualMachine ) -> PyObjectRef {
49+ // 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 ( )
5052 }
5153
5254 #[ pyfunction]
You can’t perform that action at this time.
0 commit comments