diff options
author | Jonathan Wakely <jwakely.gcc@gmail.com> | 2010-11-01 21:28:44 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2010-11-01 21:28:44 +0000 |
commit | db4e59bb2b2d8449f1eb836d5075cf0dd9875159 (patch) | |
tree | f47a0d6f6a65a0a8ecd8b782da1c3e76b8414542 /libstdc++-v3/python | |
parent | fd888d938b2f3dec3a52e08310546ce070cb14f3 (diff) | |
download | gcc-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.py | 5 |
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 |