aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/python
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-08-15 18:37:30 +0000
committerTom Tromey <tromey@gcc.gnu.org>2012-08-15 18:37:30 +0000
commitc4269a634c6c7a1a3308d0530804623e34f05651 (patch)
tree81401eaa7a7d0a2b21796664fe48f0466bbb3ccd /libstdc++-v3/python
parent5dfe1ad49692530846e53ed49823fa3bf10e4371 (diff)
downloadgcc-c4269a634c6c7a1a3308d0530804623e34f05651.zip
gcc-c4269a634c6c7a1a3308d0530804623e34f05651.tar.gz
gcc-c4269a634c6c7a1a3308d0530804623e34f05651.tar.bz2
cxx11.cc (struct datum): New.
* testsuite/libstdc++-prettyprinters/cxx11.cc (struct datum): New. (global): New global. (main): Add test for unique_ptr. * python/libstdcxx/v6/printers.py (UniquePointerPrinter.to_string): Extract the pointer and also print its type. From-SVN: r190417
Diffstat (limited to 'libstdc++-v3/python')
-rw-r--r--libstdc++-v3/python/libstdcxx/v6/printers.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py
index 4520f32..0eac413 100644
--- a/libstdc++-v3/python/libstdcxx/v6/printers.py
+++ b/libstdc++-v3/python/libstdcxx/v6/printers.py
@@ -71,7 +71,9 @@ class UniquePointerPrinter:
self.val = val
def to_string (self):
- return self.val['_M_t']
+ v = self.val['_M_t']['_M_head_impl']
+ return ('std::unique_ptr<%s> containing %s' % (str(v.type.target()),
+ str(v)))
class StdListPrinter:
"Print a std::list"