This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2] New common function "startswith"
- From: Gary Benson <gbenson at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org, Andreas Arnez <arnez at linux dot vnet dot ibm dot com>
- Date: Fri, 6 Mar 2015 09:48:08 +0000
- Subject: Re: [PATCH v2] New common function "startswith"
- Authentication-results: sourceware.org; auth=none
- References: <20150304092720 dot GA26337 at blade dot nx> <1425486409-16480-1-git-send-email-gbenson at redhat dot com> <20150305181807 dot GC4604 at adacore dot com>
Joel Brobecker wrote:
> > This patch introduces a new inline common function "startswith"
> > which takes two string arguments and returns nonzero if the first
> > string starts with the second. It also updates the 295 places
> > where this logic was written out longhand to use the new function.
> >
> > Changes from the first version are:
> >
> > - The function is now inline.
> > - The arguments got renamed to "string" and "pattern".
> > - I found 115 more places to use it.
> >
> > Regression tested on RHEL 6.6 x86_64.
> >
> > Ok to commit?
> > --
> > gdb/ChangeLog:
> >
> > * common/common-utils.h (startswith): New inline function.
> > All places where this logic was used updated to use the above.
>
> I didn't read the entire file all that carefully, just the first
> few pages of it. If it was a mechanical change, and then tested
> as you say, it's good enough for me, I think.
>
> OK to push!
Thanks Joel, I pushed it.
Cheers,
Gary
--
http://gbenson.net/