Skip to content

Commit e953cfb

Browse files
committed
remove unused function
1 parent cae034b commit e953cfb

File tree

1 file changed

+2
-22
lines changed
  • graalpython/com.oracle.graal.python.cext/src

1 file changed

+2
-22
lines changed

graalpython/com.oracle.graal.python.cext/src/gcmodule.c

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -633,29 +633,9 @@ is_referenced_from_managed(PyGC_Head *gc)
633633
* a Java array that is then referenced from each wrapper of native objects in
634634
* the reference cycle. Therefore, if a native object of the cycle is then again
635635
* used in managed code, it will keep all objects of the cycle alive.
636+
*
637+
* see `GraalPyTruffleObject_ReplicateNativeReferences`
636638
*/
637-
#if 0
638-
static void
639-
break_cycles_with_managed_objects(PyGC_Head *young)
640-
{
641-
// previous elem in the young list, used for restore gc_prev.
642-
PyGC_Head *gc = GC_NEXT(young);
643-
644-
/* Invariant: all objects that are part of a reference cycle have either
645-
* 'gc_refs == 0' if it is a native object or 'gc_refs == MANAGED_REFCNT'
646-
* if it is managed object.
647-
*/
648-
while (gc != young) {
649-
PyObject *op = FROM_GC(gc);
650-
if (is_managed(op) && gc_get_refs(gc) == MANAGED_REFCNT
651-
&& Py_REFCNT(op) > MANAGED_REFCNT) {
652-
traverseproc traverse = Py_TYPE(op)->tp_traverse;
653-
collect_cycle_objects(op);
654-
}
655-
gc = (PyGC_Head*)UNTAG(gc)->_gc_next;
656-
}
657-
}
658-
#endif
659639

660640
/* GraalPy change: additions end */
661641

0 commit comments

Comments
 (0)