diff options
Diffstat (limited to 'debian/patches/libstdc++-python3.diff')
-rw-r--r-- | debian/patches/libstdc++-python3.diff | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/debian/patches/libstdc++-python3.diff b/debian/patches/libstdc++-python3.diff index 38ffb7d..40ba67d 100644 --- a/debian/patches/libstdc++-python3.diff +++ b/debian/patches/libstdc++-python3.diff @@ -1,8 +1,10 @@ # DP: Make the libstdc++-v3 pretty printer compatible with Python3. +Index: b/src/libstdc++-v3/python/libstdcxx/v6/printers.py +=================================================================== --- a/src/libstdc++-v3/python/libstdcxx/v6/printers.py +++ b/src/libstdc++-v3/python/libstdcxx/v6/printers.py -@@ -51,7 +51,7 @@ +@@ -51,7 +51,7 @@ def find_type(orig, name): # anything fancier here. field = typ.fields()[0] if not field.is_base_class: @@ -11,7 +13,7 @@ typ = field.type class SharedPointerPrinter: -@@ -97,7 +97,7 @@ +@@ -97,7 +97,7 @@ class StdListPrinter: def __iter__(self): return self @@ -20,7 +22,7 @@ if self.base == self.head: raise StopIteration elt = self.base.cast(self.nodetype).dereference() -@@ -144,7 +144,7 @@ +@@ -144,7 +144,7 @@ class StdSlistPrinter: def __iter__(self): return self @@ -29,7 +31,7 @@ if self.base == 0: raise StopIteration elt = self.base.cast(self.nodetype).dereference() -@@ -198,7 +198,7 @@ +@@ -198,7 +198,7 @@ class StdVectorPrinter: def __iter__(self): return self @@ -38,7 +40,7 @@ count = self.count self.count = self.count + 1 if self.bitvec: -@@ -276,20 +276,20 @@ +@@ -276,20 +276,20 @@ class StdTuplePrinter: # Set the actual head to the first pair. self.head = self.head.cast (nodes[0].type) elif len (nodes) != 0: @@ -62,7 +64,7 @@ # - Left node is the next recursion parent. # - Right node is the actual class contained in the tuple. -@@ -353,7 +353,7 @@ +@@ -353,7 +353,7 @@ class RbtreeIterator: def __len__(self): return int (self.size) @@ -71,7 +73,7 @@ if self.count == self.size: raise StopIteration result = self.node -@@ -414,9 +414,9 @@ +@@ -414,9 +414,9 @@ class StdMapPrinter: def __iter__(self): return self @@ -83,7 +85,7 @@ n = n.cast(self.type).dereference()['_M_value_field'] self.pair = n item = n['first'] -@@ -456,8 +456,8 @@ +@@ -456,8 +456,8 @@ class StdSetPrinter: def __iter__(self): return self @@ -94,7 +96,7 @@ item = item.cast(self.type).dereference()['_M_value_field'] # FIXME: this is weird ... what to do? # Maybe a 'set' display hint? -@@ -534,7 +534,7 @@ +@@ -534,7 +534,7 @@ class StdDequePrinter: def __iter__(self): return self @@ -103,7 +105,7 @@ if self.p == self.last: raise StopIteration -@@ -572,7 +572,7 @@ +@@ -572,7 +572,7 @@ class StdDequePrinter: size = self.buffer_size * delta_n + delta_s + delta_e @@ -112,7 +114,7 @@ def children(self): start = self.val['_M_impl']['_M_start'] -@@ -627,7 +627,7 @@ +@@ -627,7 +627,7 @@ class Tr1HashtableIterator: def __iter__ (self): return self @@ -121,33 +123,33 @@ if self.node == 0: raise StopIteration node = self.node.cast(self.node_type) -@@ -655,8 +655,8 @@ +@@ -655,8 +655,8 @@ class Tr1UnorderedSetPrinter: return '[%d]' % i def children (self): - counter = itertools.imap (self.format_count, itertools.count()) - return itertools.izip (counter, Tr1HashtableIterator (self.hashtable())) -+ counter = map (self.format_count, itertools.count()) -+ return zip (counter, Tr1HashtableIterator (self.hashtable())) ++ counter = list(map (self.format_count, itertools.count())) ++ return list(zip (counter, Tr1HashtableIterator (self.hashtable()))) class Tr1UnorderedMapPrinter: "Print a tr1::unordered_map" -@@ -688,11 +688,11 @@ +@@ -688,11 +688,11 @@ class Tr1UnorderedMapPrinter: return '[%d]' % i def children (self): - counter = itertools.imap (self.format_count, itertools.count()) -+ counter = map (self.format_count, itertools.count()) ++ counter = list(map (self.format_count, itertools.count())) # Map over the hash table and flatten the result. - data = self.flatten (itertools.imap (self.format_one, Tr1HashtableIterator (self.hashtable()))) -+ data = self.flatten (map (self.format_one, Tr1HashtableIterator (self.hashtable()))) ++ data = self.flatten (list(map (self.format_one, Tr1HashtableIterator (self.hashtable())))) # Zip the two iterators together. - return itertools.izip (counter, data) -+ return zip (counter, data) ++ return list(zip (counter, data)) def display_hint (self): return 'map' -@@ -709,7 +709,7 @@ +@@ -709,7 +709,7 @@ class StdForwardListPrinter: def __iter__(self): return self @@ -156,7 +158,7 @@ if self.base == 0: raise StopIteration elt = self.base.cast(self.nodetype).dereference() -@@ -764,7 +764,7 @@ +@@ -764,7 +764,7 @@ class Printer(object): # A small sanity check. # FIXME if not self.compiled_rx.match(name + '<>'): |