Re: [PATCH 3/4] gendwarfksyms: Add a kABI rule to override type strings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Petr,

On Mon, May 5, 2025 at 5:17 AM Petr Pavlu <petr.pavlu@xxxxxxxx> 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





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux