diff mbox

testsuite allocators patch

Message ID 20140729213354.GA2361@redhat.com
State New
Headers show

Commit Message

Jonathan Wakely July 29, 2014, 9:33 p.m. UTC
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.

Comments

Jonathan Wakely July 29, 2014, 9:39 p.m. UTC | #1
On 29/07/14 22:33 +0100, Jonathan Wakely wrote:
>Tested x86_64-linux (thanks to Samual Bronson for testing with
>Python3) and committed to trunk.

Oops, Samuel not Samual ... no idea why my fingers typed that wrong!
diff mbox

Patch

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