aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2022-05-26 09:49:40 +0100
committerJonathan Wakely <jwakely@redhat.com>2022-05-26 10:05:51 +0100
commit634b0089f664cca96d71262b295025e057054f2c (patch)
tree66ffaf70a68da882f4cbc6cbe02a3e15aee10de6
parent6eb60ced21ebca771bf085b3cc339569f3ccb106 (diff)
downloadgcc-634b0089f664cca96d71262b295025e057054f2c.zip
gcc-634b0089f664cca96d71262b295025e057054f2c.tar.gz
gcc-634b0089f664cca96d71262b295025e057054f2c.tar.bz2
libstdc++: Fix printing of std::atomic<shared_ptr<T>> for versioned namespace
libstdc++-v3/ChangeLog: * python/libstdcxx/v6/printers.py (SharedPointerPrinter): Strip versioned namespace from the template argument too.
-rw-r--r--libstdc++-v3/python/libstdcxx/v6/printers.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py
index 0bd793c..17d5e5b 100644
--- a/libstdc++-v3/python/libstdcxx/v6/printers.py
+++ b/libstdc++-v3/python/libstdcxx/v6/printers.py
@@ -242,6 +242,7 @@ class SharedPointerPrinter:
state = 'empty'
refcounts = self._get_refcounts()
targ = self.val.type.template_argument(0)
+ targ = strip_versioned_namespace(str(targ))
if refcounts != 0:
usecount = refcounts['_M_use_count']
@@ -250,7 +251,7 @@ class SharedPointerPrinter:
state = 'expired, weak count %d' % weakcount
else:
state = 'use count %d, weak count %d' % (usecount, weakcount - 1)
- return '%s<%s> (%s)' % (self.typename, str(targ), state)
+ return '%s<%s> (%s)' % (self.typename, targ, state)
def _tuple_impl_get(val):
"Return the tuple element stored in a _Tuple_impl<N, T> base class."