mirror of git://gcc.gnu.org/git/gcc.git
PR libstdc++/86112 fix printers for Python 2.6
Dict comprehensions are only supported since Python 2.7, so use an alternative syntax that is backwards compatible. PR libstdc++/86112 * python/libstdcxx/v6/printers.py (add_one_template_type_printer): Replace dict comprehension. From-SVN: r262115
This commit is contained in:
parent
b36bc89e32
commit
4fdb6fb6ae
|
|
@ -1,5 +1,9 @@
|
||||||
2018-06-25 Jonathan Wakely <jwakely@redhat.com>
|
2018-06-25 Jonathan Wakely <jwakely@redhat.com>
|
||||||
|
|
||||||
|
PR libstdc++/86112
|
||||||
|
* python/libstdcxx/v6/printers.py (add_one_template_type_printer):
|
||||||
|
Replace dict comprehension.
|
||||||
|
|
||||||
PR libstdc++/81092
|
PR libstdc++/81092
|
||||||
* config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
|
* config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1438,7 +1438,8 @@ def add_one_template_type_printer(obj, name, defargs):
|
||||||
if _versioned_namespace:
|
if _versioned_namespace:
|
||||||
# Add second type printer for same type in versioned namespace:
|
# Add second type printer for same type in versioned namespace:
|
||||||
ns = 'std::' + _versioned_namespace
|
ns = 'std::' + _versioned_namespace
|
||||||
defargs = { n: d.replace('std::', ns) for n,d in defargs.items() }
|
# PR 86112 Cannot use dict comprehension here:
|
||||||
|
defargs = dict((n, d.replace('std::', ns)) for (n,d) in defargs.items())
|
||||||
printer = TemplateTypePrinter(ns+name, defargs)
|
printer = TemplateTypePrinter(ns+name, defargs)
|
||||||
gdb.types.register_type_printer(obj, printer)
|
gdb.types.register_type_printer(obj, printer)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue