Message ID | 20230928174630.4004388-6-tromey@adacore.com |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp3492825vqu; Thu, 28 Sep 2023 10:53:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEqNulZx7BqJmqHtx8yRNIfSmzuqtkGhKPrv+PpI6wXpP3RiNXczF9IMr9UlP+SqdfKU+nN X-Received: by 2002:a05:6402:14ce:b0:533:87c9:4a81 with SMTP id f14-20020a05640214ce00b0053387c94a81mr1893493edx.29.1695923587219; Thu, 28 Sep 2023 10:53:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695923587; cv=none; d=google.com; s=arc-20160816; b=lyP3swktrVwuXcjj2lrzjZMk5sTc9lbHWZUo23CMocSVJL3e41rehqN3igxfrMVTA9 Zhquy0H9GV4jKidCqxTNh1SFx2Bngw7Q0Lxc8hWgDAkdqshCIO8kPfMuaHKjIXNFa+VZ jcp0rObfWFBVwzXMnRUZMp/DIa+/8HoUjZTtyVYZ3UsbhnAvvrrA+h098iCmNmg0Eu1z GDYX/Nt/Y9RUehcx1Q44iuLcjGioLbpMaUZLD7faKYCr8QAT3zYRq6AE+4GRfpxgn16Y 2DQVObaZBZggrlxtUXtH5RVnXsTw484gWBzzny588lQCDVsaNO6wqQiwTvO5y3JlUcc0 ncfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dmarc-filter:delivered-to; bh=lqL2GzFnpSx3UUgHDf9JMlOrnoCg9AXRMAONIgiIlRo=; fh=Ogh3zaPUNpdNYHofIVNHsbX+D3lwaT1T8Jhe/MolwAA=; b=AB5Cy2FvHcPJYK4oKjxp+ubP1fMiRuT/TjfuuTHZnwsaCO0njCA5m34Npw7PvR8nrB jAtJJBIbojcFQRWdFCSYG/v/1vx3DQ5IhX2Gbg3YEnT/0htD+zJfRbFJnvGKhSsSUlG6 uvn0CZSF9I/4mCyeM19bUe4XKwguEE9VdbWHjj7IFM9sN9AlhgQAq7lLsxN+i49tcbzb vyjfNUkt4nkSa/z1V64yLuxZJ9ljoDJm7XtxSJpMT3+myZUzDaTWk05QCr/RRCvgw3QP i8uUFg6qmqJmH55fYXHY30bzrPFytzXe9Te7rQ2MIu4CvGqpJL3QbfPOPtRDncO6Jr8I hwDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@adacore.com header.s=google header.b=Pa+B9DD4; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=adacore.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id r7-20020aa7cfc7000000b00529fae6ac14si14672810edy.158.2023.09.28.10.53.06 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 10:53:07 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@adacore.com header.s=google header.b=Pa+B9DD4; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=adacore.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D515538323C8 for <ouuuleilei@gmail.com>; Thu, 28 Sep 2023 17:48:34 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) by sourceware.org (Postfix) with ESMTPS id 1FA7B386192A for <gcc-patches@gcc.gnu.org>; Thu, 28 Sep 2023 17:46:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1FA7B386192A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-il1-x136.google.com with SMTP id e9e14a558f8ab-3513dcd38ebso26518095ab.1 for <gcc-patches@gcc.gnu.org>; Thu, 28 Sep 2023 10:46:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1695923204; x=1696528004; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lqL2GzFnpSx3UUgHDf9JMlOrnoCg9AXRMAONIgiIlRo=; b=Pa+B9DD4RspaZdl/zSfmsyTAAdKqVq/HvOfEpA0F3BRo5jfpPrqYlRExm+q15zuoHV HqF1QDhNQArL2MlkzbCI1hyDWpEPjQWL8PB95pvOciRK5MPvciUI12Pt19NBuJMKzQGO bLVuZyieHRIDDC6LA9bf28J/mdz14zuFzDSdgG9Z2w1PSqoPb4EJQZ1ZUjvRpMRq8dVG 74O2WbdKgHwm7TIqeHFVIA2Rn8UPiHTAC9Ybn4kv6fby6Lm2VRCuHS8fbK3vgTxIkYeG 5yPMlk6Y4iUf3ydaOvDZHCqEoqqwtlOnNISRTvekjiSSr/O1TiItW1U2qUla9q6Og8vG 7C6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695923204; x=1696528004; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lqL2GzFnpSx3UUgHDf9JMlOrnoCg9AXRMAONIgiIlRo=; b=jjPsjTnJj+wWN2l0JYGbHlpKO7K2vD9nKfNB7M7JP2KXAd5sR+o1WjSxOeKq4CJ4o5 y1aO4NC4z+h+bomn5HJm5qDSXxR7/AsiZ6Chuy23Me5xTkbpCXgzDFkNrA3K14arzST8 UyvuzOUkIiS5T3w5GOu0db2K9K/kQZ80BxkmruIkLRgVM12IaS20JLXnC/yK/qILhbco l/I3uaN0XugZ9zJU37KlSP7A8FjnkCgF+TCQdItp4JEyo1lGS7fVk+7lVHXNo+uA7Cjd 3jnUOElI3NQmHxXorFFKvv+Hr2YiK5fe2nrfk9BZ+KQloNr52urWgN7nPvkujbMTlcZU oCAA== X-Gm-Message-State: AOJu0YwbfAoHlRNNVmHY7511piA25mHmf8nzMxtTo3DEmu5VoNVKqV+e Ys5xjZnvDZapnLPW+SLkQB5dkof1IPf2PfgxMj45Kg== X-Received: by 2002:a05:6e02:1543:b0:34f:e4e1:b4aa with SMTP id j3-20020a056e02154300b0034fe4e1b4aamr2010352ilu.14.1695923204438; Thu, 28 Sep 2023 10:46:44 -0700 (PDT) Received: from localhost.localdomain (71-211-130-31.hlrn.qwest.net. [71.211.130.31]) by smtp.gmail.com with ESMTPSA id p6-20020a92d486000000b0034fc8c1c24fsm3450963ilg.54.2023.09.28.10.46.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 10:46:44 -0700 (PDT) From: Tom Tromey <tromey@adacore.com> To: gcc-patches@gcc.gnu.org Cc: libstdc++@gcc.gnu.org, Tom Tromey <tromey@adacore.com> Subject: [PATCH 5/7] libstdc++: Remove std_ratio_t_tuple Date: Thu, 28 Sep 2023 11:46:28 -0600 Message-Id: <20230928174630.4004388-6-tromey@adacore.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230928174630.4004388-1-tromey@adacore.com> References: <20230928174630.4004388-1-tromey@adacore.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778304771391583196 X-GMAIL-MSGID: 1778304771391583196 |
Series |
libstdc++: Use gdb.ValuePrinter in pretty-printers
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Tom Tromey
Sept. 28, 2023, 5:46 p.m. UTC
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. 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(-)
Comments
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 > >
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"