On Fri, 1 Dec 2023 at 05:20, Nathan Bossart <nathandboss...@gmail.com> wrote:
> Could we simplify it with something like the following?

Great suggestion! Updated the patchset accordingly.

This made it also easy to change the final patch to include the
automatic scoped declaration logic for all of the new macros. I quite
like how the calling code changes to not have to declare the variable.
But it's definitely a larger divergence from the status quo than
without patch 0003. So I'm not sure if it's desired.

Finally, I also renamed the functions to use foreach instead of
for_each, since based on this thread that seems to be the generally
preferred naming.

Attachment: v6-0002-Use-new-for_each_xyz-macros-in-a-few-places.patch
Description: Binary data

Attachment: v6-0001-Add-macros-for-looping-through-a-list-without-nee.patch
Description: Binary data

Attachment: v6-0003-Even-more-convenient-macros.patch
Description: Binary data

Reply via email to