diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-15 20:54:22 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-15 20:54:22 +0000 |
commit | 9135268039c746f15fc83dffb571d0345b231abc (patch) | |
tree | a3f1a03f92afe861f4754c06779b71ca16f21e64 /libstdc++-v3/python | |
parent | 56b5c9636cbbbd5c46b364ec7bf6aef88d94f469 (diff) | |
download | gcc-9135268039c746f15fc83dffb571d0345b231abc.tar.gz |
* python/libstdcxx/v6/printers.py (StdMapPrinter.__init__): Don't
set self.iter.
(StdMapPrinter.to_string): Make a new iterator.
(StdMapPrinter.children): Likewise.
(StdSetPrinter.__init__): Don't set self.iter.
(StdSetPrinter.to_string): Make a new iterator.
(StdSetPrinter.children): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148506 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/python')
-rw-r--r-- | libstdc++-v3/python/libstdcxx/v6/printers.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py index 4dddd8f60f9..e2bb231e15a 100644 --- a/libstdc++-v3/python/libstdcxx/v6/printers.py +++ b/libstdc++-v3/python/libstdcxx/v6/printers.py @@ -277,17 +277,17 @@ class StdMapPrinter: def __init__ (self, typename, val): self.typename = typename self.val = val - self.iter = RbtreeIterator (val) def to_string (self): - return '%s with %d elements' % (self.typename, len (self.iter)) + return '%s with %d elements' % (self.typename, + len (RbtreeIterator (self.val))) def children (self): keytype = self.val.type.template_argument(0).const() valuetype = self.val.type.template_argument(1) nodetype = gdb.lookup_type('std::_Rb_tree_node< std::pair< %s, %s > >' % (keytype, valuetype)) nodetype = nodetype.pointer() - return self._iter (self.iter, nodetype) + return self._iter (RbtreeIterator (self.val), nodetype) def display_hint (self): return 'map' @@ -317,15 +317,15 @@ class StdSetPrinter: def __init__ (self, typename, val): self.typename = typename self.val = val - self.iter = RbtreeIterator (val) def to_string (self): - return '%s with %d elements' % (self.typename, len (self.iter)) + return '%s with %d elements' % (self.typename, + len (RbtreeIterator (self.val))) def children (self): keytype = self.val.type.template_argument(0) nodetype = gdb.lookup_type('std::_Rb_tree_node< %s >' % keytype).pointer() - return self._iter (self.iter, nodetype) + return self._iter (RbtreeIterator (self.val), nodetype) class StdBitsetPrinter: "Print a std::bitset" |