unsafe fn traverse_impl<T>(
slf: *mut PyObject,
impl_: fn(&T, PyVisit<'_>) -> Result<(), PyTraverseError>,
visit: visitproc,
arg: *mut c_void,
current_traverse: traverseproc,
) -> c_intwhere
T: PyClass,Expand description
Visits the base type, the instance __dict__ and the pyclass’s own data, stopping as soon as
one of them returns non-zero.
§Safety
slfmust be a valid pointer to an instance ofT.- Must only be called from
_call_traverse, which holds thePanicTrapandForbidAttachinglock this relies on.