public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Doug Evans <dje@google.com>,
	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: Sun, 15 Jul 2012 02:17:00 -0000	[thread overview]
Message-ID: <87hat9939b.fsf@fleche.redhat.com> (raw)
In-Reply-To: <831ukeam18.fsf__35820.0409253643$1342247693$gmane$org@gnu.org>	(Eli Zaretskii's message of "Sat, 14 Jul 2012 09:34:27 +0300")

>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:

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

It is just to avoid other users having to write their own.

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

Yes.

We have streq for this, for use in hash tables and elsewhere.  It would
have been better if this were in libiberty, since currently there is a
copy of this function in gdb and like 3 or 4 in gcc.

Tom

      parent reply	other threads:[~2012-07-15  2:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-09 18:10 Doug Evans
2012-07-09 18:51 ` Steven Bosscher
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
     [not found]           ` <831ukeam18.fsf__35820.0409253643$1342247693$gmane$org@gnu.org>
2012-07-15  2:17             ` Tom Tromey [this message]

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=87hat9939b.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=dj@redhat.com \
    --cc=dje@google.com \
    --cc=eliz@gnu.org \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).