Hi, Mark H Weaver <m...@netris.org> skribis:
> l...@gnu.org (Ludovic Courtès) writes: > >> Mark H Weaver <m...@netris.org> skribis: >> >>> I guess this 'if' is to avoid an infinite loop if the struct points back >>> to itself. However, it apparently fails to detect cycles in the general >>> case. >> >> Yes, indeed. >> >> Here’s an updated patch that uses the ‘depth’ argument of ‘scm_hasher’ >> for that, as is done for pairs. > > I don't think 'depth' is an appropriate name for that argument. Yeah, it’s debatable. It’s called just ‘d’ in hash.c, and Andy renamed it to ‘depth’ in 2.1. I think ‘depth’ conveys the idea that it’s about limiting the recursion depth. I’d keep it this way for consistency. Thanks, Ludo’.