public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH 0/3] remove overlapping allocation macros
Date: Mon, 06 Jan 2014 18:14:00 -0000	[thread overview]
Message-ID: <CADPb22RLdEEjfpV6E6TCjDQj6jFF9t0QdidYs3f__152O4eLnw@mail.gmail.com> (raw)
In-Reply-To: <1389029524-19907-1-git-send-email-tromey@redhat.com>

On Mon, Jan 6, 2014 at 9:32 AM, Tom Tromey <tromey@redhat.com> wrote:
> Right now, gdb defines some allocation macros in defs.h, specifically
> XZALLOC, XMALLOC, and XCALLOC.  libiberty also defines similar
> allocation macros, and gdb uses both variants.
>
> I think it's somewhat nicer if gdb uses just a single set of wrapper
> macros, and so this patch series replaces all the uses of the gdb
> macros with the corresponding macros from libiberty.
>
> Let me know what you think.
>
> Tested by rebuilding on x86-64 Fedora 18 and doing a cross build to
> mingw.  It's possible therefore that there are some buglets remaining.

I'm all for the increased simplicity.
I just wish libiberty's macro naming didn't suck so badly.
[Not necessarily a fault at the time, but it sucks now. :-)]

E.g., after this series, "vec" use to have a more specific connotation,
(I could at least ignore libiberty's choice),
and I hate it when terms with good specific connotations get polluted.
There's a material downgrade in the readability of the code when
that happens.

Fortunately, I guess this will only be a temporary material downgrade,
since vec -> stl::vector soon.

  parent reply	other threads:[~2014-01-06 18:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-06 17:32 Tom Tromey
2014-01-06 17:32 ` [PATCH 2/3] replace XMALLOC with XNEW Tom Tromey
2014-01-06 17:32 ` [PATCH 3/3] replace XCALLOC with XCNEWVEC or XCNEW Tom Tromey
2014-01-06 17:32 ` [PATCH 1/3] replace XZALLOC with XCNEW Tom Tromey
2014-01-06 18:14 ` Doug Evans [this message]
2014-01-06 18:46 ` [PATCH 0/3] remove overlapping allocation macros Pedro Alves
2014-01-06 21:12   ` Tom Tromey
2014-01-13 14:33 ` 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=CADPb22RLdEEjfpV6E6TCjDQj6jFF9t0QdidYs3f__152O4eLnw@mail.gmail.com \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.com \
    /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).