]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Remove std_ratio_t_tuple
authorTom Tromey <tromey@adacore.com>
Tue, 26 Sep 2023 20:04:26 +0000 (14:04 -0600)
committerTom Tromey <tromey@adacore.com>
Thu, 28 Sep 2023 20:56:05 +0000 (14:56 -0600)
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

index c5ecd881b734890730103181514e9f06d41bc34a..e530cfc0e3a5b983216d6c365bb24b5558a25ea9 100644 (file)
@@ -2019,14 +2019,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."""