public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: Simon Marchi <simark@simark.ca>
Cc: Tom Tromey <tromey@adacore.com>,  gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] Use obstack in ada_encode_1
Date: Wed, 07 Oct 2020 12:35:45 -0600	[thread overview]
Message-ID: <87o8ldopdq.fsf@tromey.com> (raw)
In-Reply-To: <2d52a731-17e4-4a8f-0916-9a2203b0c94d@simark.ca> (Simon Marchi's message of "Fri, 2 Oct 2020 17:54:00 -0400")

>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:

Simon> I think the same could be achieved using a static std::string instead of
Simon> an obstack, and it would be a bit more C++-y, but either way is fine
Simon> with me.

Yeah, actually it is probably a better API to simply return a new
string.  I avoided this since I wasn't sure about why the function is
the way it is -- is it to avoid the difficulties of managing an
allocation in C, or is it to avoid extra allocations?  But I looked at
the callers and I think it will be fine.

Tom

  reply	other threads:[~2020-10-07 18:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-02 20:26 [PATCH 0/2] ada_encode rewrites Tom Tromey
2020-10-02 20:26 ` [PATCH 1/2] Constify ada_encode return type Tom Tromey
2020-10-02 21:51   ` Simon Marchi
2020-10-07 18:26     ` Tom Tromey
2020-10-02 20:26 ` [PATCH 2/2] Use obstack in ada_encode_1 Tom Tromey
2020-10-02 21:54   ` Simon Marchi
2020-10-07 18:35     ` Tom Tromey [this message]
2020-10-07 18:36       ` Simon Marchi
2020-10-09 20:14       ` Joel Brobecker

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=87o8ldopdq.fsf@tromey.com \
    --to=tromey@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simark@simark.ca \
    /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).