1 2010-06-01 Chris Moller <cmoller@redhat.com>
3 * python/libstdcxx/v6/printers.py (StdVectorPrinter): Add
4 detection for matrices as nested vectors.
6 Index: libstdc++-v3/python/libstdcxx/v6/printers.py
7 ===================================================================
8 --- ./libstdc++-v3-python-r155978/libstdcxx/v6/printers.py (revision 159937)
9 +++ ./libstdc++-v3-python-r155978/libstdcxx/v6/printers.py (working copy)
14 +vector_sig = 'std::vector'
15 +vector_regex = re.compile('^' + vector_sig + '<.*>$')
17 class StdPointerPrinter:
18 "Print a smart pointer of some kind"
21 % (self.typename, int (finish - start), int (end - start)))
23 def display_hint(self):
25 + itype0 = self.val.type.template_argument(0)
27 + if itag and re.match(vector_regex, itag):
33 class StdVectorIteratorPrinter:
34 "Print std::vector::iterator"
36 pretty_printers_dict[re.compile('^std::set<.*>$')] = lambda val: StdSetPrinter("std::set", val)
37 pretty_printers_dict[re.compile('^std::stack<.*>$')] = lambda val: StdStackOrQueuePrinter("std::stack", val)
38 pretty_printers_dict[re.compile('^std::unique_ptr<.*>$')] = UniquePointerPrinter
39 - pretty_printers_dict[re.compile('^std::vector<.*>$')] = lambda val: StdVectorPrinter("std::vector", val)
40 + pretty_printers_dict[vector_regex] = lambda val: StdVectorPrinter(vector_sig, val)
43 # Printer registrations for classes compiled with -D_GLIBCXX_DEBUG.