From: Eli Zaretskii <eliz@gnu.org>
To: Doug Evans <dje@google.com>
Cc: dj@redhat.com, gcc-patches@gcc.gnu.org, gdb-patches@sourceware.org
Subject: Re: [RFA libiberty, gdb] Add hashtab support to filename_ncmp.c and use it in gdb.
Date: Fri, 13 Jul 2012 19:48:00 -0000 [thread overview]
Message-ID: <83a9z3a1f5.fsf@gnu.org> (raw)
In-Reply-To: <CADPb22Q-k52YCUO72y+Wvew8Z+1vvjz5fwQVPQdhWsvkiugSeg@mail.gmail.com>
> Date: Fri, 13 Jul 2012 12:36:44 -0700
> From: Doug Evans <dje@google.com>
> Cc: gcc-patches@gcc.gnu.org, gdb-patches@sourceware.org
>
> 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.
Sorry if I'm missing something, but why do we need to advertise such a
function at all? Given that libiberty already provides filename_cmp,
isn't it trivial to write something like filename_eq whenever someone
needs to use hashes of file names?
next prev parent reply other threads:[~2012-07-13 19:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20120709181015.2FCA41E13A1@ruffy2.mtv.corp.google.com>
[not found] ` <CABu31nPhJ_3+yCNCArF7P3+Z+13cXVSoTqUyn1rKKQXv4+oVUA@mail.gmail.com>
2012-07-09 19:49 ` Doug Evans
2012-07-13 18:52 ` Doug Evans
2012-07-13 19:22 ` DJ Delorie
2012-07-13 19:37 ` Doug Evans
2012-07-13 19:46 ` DJ Delorie
2012-07-13 19:48 ` Eli Zaretskii [this message]
2012-07-13 21:26 ` Doug Evans
2012-07-14 6:34 ` Eli Zaretskii
[not found] ` <831ukeam18.fsf__35820.0409253643$1342247693$gmane$org@gnu.org>
2012-07-15 2:18 ` Tom Tromey
2012-07-14 0:07 ` Doug Evans
2012-07-14 1:59 ` Tom Tromey
2012-07-09 18:14 Doug Evans
2012-07-10 19:17 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83a9z3a1f5.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=dj@redhat.com \
--cc=dje@google.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox