public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Tom Tromey <tromey@adacore.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
	"libstdc++" <libstdc++@gcc.gnu.org>
Subject: Re: [PATCH 5/7] libstdc++: Remove std_ratio_t_tuple
Date: Thu, 28 Sep 2023 20:01:58 +0100	[thread overview]
Message-ID: <CAH6eHdSrnmUJRR0ZDZEuSBbTLW2jmF6oFnXppzq8SrCCRY6vyA@mail.gmail.com> (raw)
In-Reply-To: <20230928174630.4004388-6-tromey@adacore.com>

[-- Attachment #1: Type: text/plain, Size: 1575 bytes --]

On Thu, 28 Sept 2023, 18:55 Tom Tromey via Libstdc++, <libstdc++@gcc.gnu.org>
wrote:

> This removes the std_ratio_t_tuple function from the Python
> pretty-printer code.  It is not used.  Apparently the relevant parts
> were moved to StdChronoDurationPrinter._ratio at some point in the
> past.
>

I think I added it at the same time as that printer, rather than moving it
there later. I don't remember if I wanted to replace the _ratio method with
that function, or vice versa, but it looks like I never finished whatever I
meant to do. Either way, we don't need to keep the unused function.

OK, thanks.





> libstdc++-v3/ChangeLog:
>
>         * python/libstdcxx/v6/printers.py (std_ratio_t_tuple):
>         Remove.
> ---
>  libstdc++-v3/python/libstdcxx/v6/printers.py | 8 --------
>  1 file changed, 8 deletions(-)
>
> diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py
> b/libstdc++-v3/python/libstdcxx/v6/printers.py
> index 6bf4fe891fd..94ac9232da7 100644
> --- a/libstdc++-v3/python/libstdcxx/v6/printers.py
> +++ b/libstdc++-v3/python/libstdcxx/v6/printers.py
> @@ -1985,14 +1985,6 @@ class StdFormatArgsPrinter(printer_base):
>          return "%s with %d arguments" % (typ, size)
>
>
> -def std_ratio_t_tuple(ratio_type):
> -    # TODO use reduced period i.e. duration::period
> -    period = self._val.type.template_argument(1)
> -    num = period.template_argument(0)
> -    den = period.template_argument(1)
> -    return (num, den)
> -
> -
>  class StdChronoDurationPrinter(printer_base):
>      "Print a std::chrono::duration"
>
> --
> 2.40.1
>
>

  reply	other threads:[~2023-09-28 19:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-28 17:46 [PATCH 0/7] libstdc++: Use gdb.ValuePrinter in pretty-printers Tom Tromey
2023-09-28 17:46 ` [PATCH 1/7] libstdc++: Show full Python stack on error Tom Tromey
2023-09-28 18:49   ` Jonathan Wakely
2023-09-28 17:46 ` [PATCH 2/7] libstdc++: Use gdb.ValuePrinter base class Tom Tromey
2023-09-28 20:26   ` Jonathan Wakely
2023-09-28 20:38     ` Tom Tromey
2023-09-28 20:49       ` Jonathan Wakely
2023-09-28 17:46 ` [PATCH 3/7] libstdc++: Remove unused Python imports Tom Tromey
2023-09-28 18:53   ` Jonathan Wakely
2023-09-28 17:46 ` [PATCH 4/7] libstdc++: Remove unused locals from printers.py Tom Tromey
2023-09-28 18:53   ` Jonathan Wakely
2023-09-28 17:46 ` [PATCH 5/7] libstdc++: Remove std_ratio_t_tuple Tom Tromey
2023-09-28 19:01   ` Jonathan Wakely [this message]
2023-09-28 17:46 ` [PATCH 6/7] libstdc++: Fix regex escapes in pretty-printers Tom Tromey
2023-09-28 18:51   ` Jonathan Wakely
2023-09-28 19:11     ` Tom Tromey
2023-09-28 17:46 ` [PATCH 7/7] libstdc++: Use Python "not in" operator Tom Tromey
2023-09-28 18:52   ` Jonathan Wakely

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=CAH6eHdSrnmUJRR0ZDZEuSBbTLW2jmF6oFnXppzq8SrCCRY6vyA@mail.gmail.com \
    --to=jwakely.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    --cc=tromey@adacore.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).