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: r275644
This commit is contained in:
Jonathan Wakely 2019-09-11 12:38:23 +01:00 committed by Jonathan Wakely
parent ce7f1ce4d0
commit c5748fdbf4
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2019-09-11 Jonathan Wakely <jwakely@redhat.com>
* python/libstdcxx/v6/xmethods.py (SharedPtrUseCountWorker.__call__):
Fix syntax error.
* testsuite/20_util/result_of/sfinae_friendly_1.cc: Add -Wno-volatile
for C++2a and up. Define HAS_52748_FIXED and fix incorrect tests.
* testsuite/tr1/3_function_objects/result_of.cc: Add -Wno-volatile

View File

@ -739,7 +739,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):