| 96 | }; |
| 97 | |
| 98 | int py_function_exporter_tp_traverse( |
| 99 | PyObject* self, |
| 100 | visitproc visit, |
| 101 | void* arg) { |
| 102 | Py_VISIT(Py_TYPE(self)); |
| 103 | if (!nb::inst_ready(self)) { |
| 104 | return 0; |
| 105 | } |
| 106 | auto* p = nb::inst_ptr<PyFunctionExporter>(self); |
| 107 | Py_VISIT(p->dep_.ptr()); |
| 108 | return 0; |
| 109 | } |
| 110 | |
| 111 | PyType_Slot py_function_exporter_slots[] = { |
| 112 | {Py_tp_traverse, (void*)py_function_exporter_tp_traverse}, |