aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/python
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely.gcc@gmail.com>2010-11-01 21:28:44 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2010-11-01 21:28:44 +0000
commitdb4e59bb2b2d8449f1eb836d5075cf0dd9875159 (patch)
treef47a0d6f6a65a0a8ecd8b782da1c3e76b8414542 /libstdc++-v3/python
parentfd888d938b2f3dec3a52e08310546ce070cb14f3 (diff)
downloadgcc-db4e59bb2b2d8449f1eb836d5075cf0dd9875159.zip
gcc-db4e59bb2b2d8449f1eb836d5075cf0dd9875159.tar.gz
gcc-db4e59bb2b2d8449f1eb836d5075cf0dd9875159.tar.bz2
re PR libstdc++/45999 (runtime error in std::vector python pretty printer.)
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. From-SVN: r166150
Diffstat (limited to 'libstdc++-v3/python')
-rw-r--r--libstdc++-v3/python/libstdcxx/v6/printers.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py
index bf3689b..fb999bf 100644
--- a/libstdc++-v3/python/libstdcxx/v6/printers.py
+++ b/libstdc++-v3/python/libstdcxx/v6/printers.py
@@ -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