public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v3] Introduce gdb::unique_ptr
Date: Sun, 16 Oct 2016 07:14:00 -0000	[thread overview]
Message-ID: <87bmyklqac.fsf@tromey.com> (raw)
In-Reply-To: <209d21ef-f3cb-6188-8654-943b2254c9b3@redhat.com> (Pedro Alves's	message of "Fri, 14 Oct 2016 13:50:27 +0100")

>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

Pedro> For managing malloc pointers, this adds a gdb::unique_malloc_ptr<T>
Pedro> "specialization" with a custom xfree deleter.

I found something surprising while using this patch: it can't be used in
a .y file, due to the malloc->xmalloc renaming done in the .y.c rule.
I puzzled over the error about "unique_xmalloc_ptr" for a while until I
remembered this.

One option would be to fix up that renaming, maybe something like:

-	     -e 's/\([^x]\)malloc/\1xmalloc/g' \
-	     -e 's/\([^x_]\)malloc/\1xmalloc/g' \

Another would be to rename the class unique_xmalloc_ptr after all.

Tom

  parent reply	other threads:[~2016-10-16  7:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-14 12:29 [PATCH v2] " Pedro Alves
2016-10-14 12:50 ` [PATCH v3] " Pedro Alves
2016-10-14 16:07   ` Simon Marchi
2016-10-14 16:11     ` Pedro Alves
2016-10-14 16:31       ` Pedro Alves
2016-10-16  7:14   ` Tom Tromey [this message]
2016-10-17 13:51     ` [PATCH v4] " Pedro Alves
2016-10-17 18:00       ` Buildslaves and C++11 support Pedro Alves
2016-10-17 23:20         ` Pedro Alves
2016-10-19  3:23           ` John Baldwin
2016-10-19 12:50             ` Pedro Alves
2016-10-18  2:33       ` [PATCH v4] Introduce gdb::unique_ptr Tom Tromey
2016-10-18 10:45         ` Pedro Alves

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=87bmyklqac.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@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).