Subject: Re: [PATCH v3 02/14] odb: fix flags parameter to be unsigned

From: Taylor Blau <[email-masked]>
Date: Thu, 22 Jan 2026 18:44:43 -0500

On Thu, Jan 22, 2026 at 07:50:58AM +0100, Patrick Steinhardt wrote:
> > You can find this pattern in lots of places (try grepping for "enum
> > [a-z_]* flag"). The ones that aren't are typically using flags that are
> > not using enums at all (just #defines).
>
> True, but `unsigned flags` is way more common:
>
>     $ git grep 'unsigned flags' | wc -l
>     219
>
>     $ git grep 'enum [a-z_]* flag' | wc -l
>     56

Sure, though I think the convention can/should evolve where it makes
sense. I tend to agree with Peff earlier in this thread that enum flags
are preferable to unsigned ones for the reasons he laid out. I don't
think we should go and proactively convert the 219 instances of
"unsigned flags", but for new code I think we should prefer enum flags.

Thanks,
Taylor