On Tue Mar 24 06:23:03 2026 +0000, Conor McCarthy wrote:
We can probably do without the context, but it will be very useful to have a stateful enumerator later. Where both up and down nodes are enumerated for connection, the current type is a complication, and we end up with multiple possibilities: current up + current down current up + enumerated down enumerated up + current down enumerated up + enumerated down An enumerator which handles this internally allows us to use a nested loop where the connection logic appears once. That's not apparent in this MR though. Possible, but even looking at the initial MR changes I still feel like the whole stateful logic with index0 / current / enumerate cached data and then calls to `type_enumerator_reset` spread around makes it difficult to follow, and it needs to be made simpler.
The `topology_branch` structure could be used to keep / cache information if we find it useful, instead of introducing a separate context structure, but a lot of the cached information doesn't seem to really deserve caching IMO. It would be better to only store characteristics of the connection mode that are slightly complicated to compute (for instance whether we need to enumerate types or not, but other info like node type, current or first media type doesn't seem useful). -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10009#note_133542