OSDN Git Service

2010-11-01 Jonathan Wakely <jwakely.gcc@gmail.com>
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 1 Nov 2010 21:28:44 +0000 (21:28 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 1 Nov 2010 21:28:44 +0000 (21:28 +0000)
PR libstdc++/45999
* python/libstdcxx/v6/printers.py (StdVectorPrinter): Replace
conditional expression with backward-compatible if-else.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166150 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/python/libstdcxx/v6/printers.py

index 1fd5338..39f5325 100644 (file)
@@ -1,3 +1,9 @@
+2010-11-01  Jonathan Wakely  <jwakely.gcc@gmail.com>
+
+       PR libstdc++/45999
+       * python/libstdcxx/v6/printers.py (StdVectorPrinter): Replace
+       conditional expression with backward-compatible if-else.
+
 2010-11-01  Jie Zhang  <jie@codesourcery.com>
 
        * config/abi/pre/gnu.ver: Export __emutls_v._ZSt11__once_call
index bf3689b..fb999bf 100644 (file)
@@ -177,7 +177,10 @@ class StdVectorPrinter:
                 if self.item == self.finish and self.so >= self.fo:
                     raise StopIteration
                 elt = self.item.dereference()
-                obit = 1 if elt & (1 << self.so) else 0
+                if elt & (1 << self.so):
+                    obit = 1
+                else:
+                    obit = 0
                 self.so = self.so + 1
                 if self.so >= self.isize:
                     self.item = self.item + 1