This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] libstdc++/77645 fix deque and vector xmethods for Python 3


The problem for these xmethods is that in Python 3 division of two
integers produces a float, and GDB then doesn't allow that value
to be used for pointer arithmetic (https://sourceware.org/PR20622).

	PR libstdc++/77645
	* python/libstdcxx/v6/xmethods.py (DequeWorkerBase.__init__)
	(DequeWorkerBase.index, VectorWorkerBase.get): Cast results of
	division to int to work with Python 3.

Tested x86_64-linux, committed to trunk.

I'll fix it for gcc-5 and gcc-6 too.


Attachment: patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]