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
This commit is contained in:
Jonathan Wakely 2010-11-01 21:28:44 +00:00 committed by Jonathan Wakely
parent fd888d938b
commit db4e59bb2b
2 changed files with 10 additions and 1 deletions

View 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

View 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