Hi Petr, On Mon, May 5, 2025 at 5:17 AM Petr Pavlu <petr.pa...@suse.com> wrote: > > On 4/30/25 23:40, Sami Tolvanen wrote: > > +static void type_parse(const char *name, const char *str, > > + struct type_expansion *type) > > +{ > > + char *fragment; > > + size_t start = 0; > > + size_t end; > > + size_t pos; > > + > > + if (!*str) > > + error("empty type string override for '%s'", name); > > + > > + type_expansion_init(type); > > + > > + for (pos = 1; str[pos]; ++pos) { > > + bool empty; > > + char marker = ' '; > > + > > + if (!is_type_prefix(&str[pos - 1])) > > + continue; [...] > > I'd find this mini-parser more straightforward, if its main loop started at > pos=0 and looked ahead, instead of starting at pos=1 and looking behind.
True, I'll send v2 with this changed. Thanks for taking a look! Sami