This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: testsuite allocators patch
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Cc: François Dumont <frs dot dumont at gmail dot com>, Paolo Carlini <paolo dot carlini at oracle dot com>
- Date: Tue, 29 Jul 2014 22:33:54 +0100
- Subject: Re: testsuite allocators patch
- Authentication-results: sourceware.org; auth=none
- References: <53AC8678 dot 5060706 at gmail dot com> <53AC8ED5 dot 3070000 at oracle dot com> <20140626223858 dot GK2711 at redhat dot com> <53AD1CCC dot 2010309 at oracle dot com> <CAH6eHdSBk9t4JR1pRLXve5f8espKBFhF+QcDhXeeCSNFFsTy0Q at mail dot gmail dot com> <53ADCA79 dot 2090007 at oracle dot com> <53D01C0B dot 2030203 at gmail dot com> <20140724085538 dot GS2361 at redhat dot com> <53D16880 dot 8060904 at gmail dot com> <CAH6eHdQ0uE3qRtqBV+fWuspZ0mqdoY7n1aNqdp+PTUnqpa0YQQ at mail dot gmail dot com>
On 25/07/14 00:19 +0100, Jonathan Wakely wrote:
On 24 July 2014 21:11, François Dumont wrote:
Yes I have tested with no other changes in my tree and got only those pretty
printers errors which are unrelated I think:
Python Exception <class 'TypeError'> iter() returned non-iterator of type
'_contained':
$2 = std::experimental::optional<int> [no contained value]
I haven't seen these, I'll fix them on Monday, thanks.
Fixed by the attached patch.
Tested x86_64-linux (thanks to Samual Bronson for testing with
Python3) and committed to trunk.
commit 7de83299c42041611360a1426f5164270ac6c6b6
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Tue Jul 29 20:08:31 2014 +0100
* python/libstdcxx/v6/printers.py
(SingleObjContainerPrinter._contained): Use compatibility mixin.
diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py
index 15d7a88..2e5cd6c 100644
--- a/libstdc++-v3/python/libstdcxx/v6/printers.py
+++ b/libstdc++-v3/python/libstdcxx/v6/printers.py
@@ -851,14 +851,14 @@ class SingleObjContainerPrinter(object):
return gdb.types.apply_type_recognizers(gdb.types.get_type_recognizers(),
type) or str(type)
- class _contained:
+ class _contained(Iterator):
def __init__ (self, val):
self.val = val
def __iter__ (self):
return self
- def next (self):
+ def __next__(self):
if self.val is None:
raise StopIteration
retval = self.val