diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2019-09-11 12:41:04 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2019-09-11 12:41:04 +0100 |
commit | 8dc213622a65e4a921ed4757873a3cdf2a18ec5a (patch) | |
tree | 1de68c6aa85a33c941d16c73c8188d677d692e95 /libstdc++-v3 | |
parent | d0cbed9de28be208b3b2009dc08f95bd8bd00f2d (diff) | |
download | gcc-8dc213622a65e4a921ed4757873a3cdf2a18ec5a.zip gcc-8dc213622a65e4a921ed4757873a3cdf2a18ec5a.tar.gz gcc-8dc213622a65e4a921ed4757873a3cdf2a18ec5a.tar.bz2 |
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: r275646
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++-v3/python/libstdcxx/v6/xmethods.py | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 73866e9..098fc6a 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2019-09-11 Jonathan Wakely <jwakely@redhat.com> + + * python/libstdcxx/v6/xmethods.py (SharedPtrUseCountWorker.__call__): + Fix syntax error. + 2019-09-02 Jonathan Wakely <jwakely@redhat.com> * doc/html/*: Regenerate. diff --git a/libstdc++-v3/python/libstdcxx/v6/xmethods.py b/libstdc++-v3/python/libstdcxx/v6/xmethods.py index 0181959..12fefdb 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): |