This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA libiberty, gdb] Add hashtab support to filename_ncmp.c and use it in gdb.


On Fri, Jul 13, 2012 at 12:21 PM, DJ Delorie <dj@redhat.com> wrote:
>
> I think it's confusing to have filename_cmp and filename_eq that do
> basically the same thing.  Perhaps filename_eq should be
> filename_cmp_v or filename_cmp_hash or something, to indicate that
> it's *supposed* to be the same functionality as filename_cmp but with
> a different signature?

To be clear, filename_cmp is to strcmp as filename_eq is to streq.

ref: STREQ in libiberty/regex.c:
# define STREQ(s1, s2) ((strcmp (s1, s2) == 0))

Given that, I think the names are fine as is, but I'm happy to change them.
I like "eq", it's what hashtab uses (e.g. htab_eq_pointer).
How about filename_eq_hash?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]