From: Simon Marchi <simark@simark.ca>
To: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Use std::string in substitute_path_component
Date: Tue, 4 Apr 2023 21:17:51 -0400 [thread overview]
Message-ID: <2ea12788-551e-b043-163a-b1063ce53098@simark.ca> (raw)
In-Reply-To: <20230404185212.1788207-1-tom@tromey.com>
On 4/4/23 14:52, Tom Tromey wrote:
> This changes substitute_path_component to use std::string, simplifying
> it quite a bit, and allowing for the removal of an xfree as well.
Your patch LGTM.
But a random thought I had while reading it: the sole user of
substitute_path_component is auto_load_expand_dir_vars, which splits the
path in components just after that. It would seem much simpler to do
the $datadir / $debugdir replacement after the split, by iterating on
the vector and checking each element. Anyway, not a big deal.
Simon
next prev parent reply other threads:[~2023-04-05 1:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-04 18:52 Tom Tromey
2023-04-05 1:17 ` Simon Marchi [this message]
2023-04-07 18:09 ` 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=2ea12788-551e-b043-163a-b1063ce53098@simark.ca \
--to=simark@simark.ca \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.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).