From: Jonathan Wakely Date: Wed, 11 Sep 2019 11:41:36 +0000 (+0100) Subject: Fix Xmethod for shared_ptr::use_count() X-Git-Tag: releases/gcc-7.5.0~124 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8038d0206c1b8b804a1c3846c6dd13a3acb3e3cf;p=thirdparty%2Fgcc.git Fix Xmethod for shared_ptr::use_count() This was reported in https://bugzilla.redhat.com/show_bug.cgi?id=1749578 * python/libstdcxx/v6/xmethods.py (SharedPtrUseCountWorker.__call__): Fix syntax error. From-SVN: r275647 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 07f86ba6ad29..c574b20600d3 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2019-09-11 Jonathan Wakely + + * python/libstdcxx/v6/xmethods.py (SharedPtrUseCountWorker.__call__): + Fix syntax error. + 2019-09-02 Jonathan Wakely PR middle-end/89303 diff --git a/libstdc++-v3/python/libstdcxx/v6/xmethods.py b/libstdc++-v3/python/libstdcxx/v6/xmethods.py index 02feab66acb2..87fee5d21fdc 100644 --- a/libstdc++-v3/python/libstdcxx/v6/xmethods.py +++ b/libstdc++-v3/python/libstdcxx/v6/xmethods.py @@ -728,7 +728,7 @@ class SharedPtrUseCountWorker(gdb.xmethod.XMethodWorker): return gdb.lookup_type('long') def __call__(self, obj): - refcounts = ['_M_refcount']['_M_pi'] + refcounts = obj['_M_refcount']['_M_pi'] return refcounts['_M_use_count'] if refcounts else 0 class SharedPtrUniqueWorker(SharedPtrUseCountWorker):