Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
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: Sat, 14 Jul 2012 06:34:00 -0000	[thread overview]
Message-ID: <831ukeam18.fsf@gnu.org> (raw)
In-Reply-To: <CADPb22T0bdYcN+JHK+7+0m+4tQ_PPFwZcj=esf+J2-9nTPU+tQ@mail.gmail.com>

> Date: Fri, 13 Jul 2012 14:26:15 -0700
> From: Doug Evans <dje@google.com>
> Cc: dj@redhat.com, gcc-patches@gcc.gnu.org, gdb-patches@sourceware.org
> 
> > 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?
> 
> It's a "matched set" with filename_hash.
> The hashtab.c constructors take a hash_f function pointer and an eq_f
> function pointer.

I understand all that, but why would the eq_f function need to be an
external function on its own?

E.g., if we were to write a qsort replacement, would we have a
suitable string comparison function declared extern, when it is a
trivial wrapper around strcmp?


  reply	other threads:[~2012-07-14  6:34 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
2012-07-13 21:26         ` Doug Evans
2012-07-14  6:34           ` Eli Zaretskii [this message]
     [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=831ukeam18.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